JAL-1601 Expand secondary structure prediction tests
[jalview.git] / test / jalview / testutils / ScopeFunctions.java
1 package jalview.testutils;
2
3 import java.util.function.Consumer;
4 import java.util.function.Supplier;
5
6 public class ScopeFunctions
7 {
8   private ScopeFunctions() {}
9   
10   public static <R> R supply(Supplier<? extends R> func)
11   {
12     return func.get();
13   }
14   
15   public static <T> T apply(T context, Consumer<? super T> func)
16   {
17     func.accept(context);
18     return context;
19   }
20 }