File tree Expand file tree Collapse file tree
src/main/java/net/marcellperger/mathexpr Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package net .marcellperger .mathexpr .cli .minicli ;
22
3- import org .jetbrains .annotations .NotNull ;
43import org .jetbrains .annotations .Nullable ;
54
65import java .util .List ;
7- import java .util .Objects ;
86
97public abstract class CLIOption <T > {
108 List <String > names ;
Original file line number Diff line number Diff line change 1010import java .util .HashMap ;
1111import java .util .List ;
1212import java .util .Map ;
13- import java .util .Objects ;
1413
1514public class MiniCLI {
1615 Map <String , CLIOption <?>> options = new HashMap <>();
Original file line number Diff line number Diff line change @@ -108,17 +108,6 @@ public static void expectOrFail(boolean cond) {
108108 if (!cond ) throw new AssertionError ("Assertion failed in expectOrFail" );
109109 }
110110
111- // @Contract("_, _ -> param1")
112- // public static<T> T expectOrFail(T value, @NotNull Predicate<T> predicate, ) {
113- // if(!predicate.test(value)) throw new AssertionError("Assertion failed in expectOrFail");
114- // return value;
115- // }
116- // @Contract("_, true -> param1; _, false -> fail")
117- // public static<T> T expectOrFail(T value, boolean cond) {
118- // if(!cond) throw new AssertionError("Assertion failed in expectOrFail");
119- // return value;
120- // }
121-
122111 @ Contract ("_, _ -> param1" )
123112 public static <T extends Throwable > @ NotNull T withCause (@ NotNull T exc , @ Nullable Throwable cause ) {
124113 if (cause != null ) exc .initCause (cause );
You can’t perform that action at this time.
0 commit comments