Package cdc.validation.checkers.defaults
Class IsGreaterThan<T extends Comparable<T>>
- java.lang.Object
-
- cdc.validation.checkers.defaults.IsGreaterThan<T>
-
public class IsGreaterThan<T extends Comparable<T>> extends Object implements Checker<T>
-
-
Field Summary
Fields Modifier and Type Field Description static FormalArgsCFARGSstatic FormalArg<Class>CLASSstatic FormalArg<Comparable>CMINstatic Factory<IsGreaterThan>FACTORYstatic FormalArgsSFARGSstatic FormalArg<String>SMIN
-
Constructor Summary
Constructors Constructor Description IsGreaterThan(Class<T> valueClass, T min)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringexplain(boolean result, String arg)Explains the conditions at which a positive or negative result is obtained.static IsGreaterThan<Byte>from(byte min)static IsGreaterThan<Character>from(char min)static IsGreaterThan<Double>from(double min)static IsGreaterThan<Float>from(float min)static IsGreaterThan<Integer>from(int min)static IsGreaterThan<Long>from(long min)static IsGreaterThan<Short>from(short min)static IsGreaterThan<String>from(String min)TgetMin()Class<T>getValueClass()booleantest(T value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cdc.validation.checkers.Checker
after, after, afterRaw, and, andRaw, cast, cast, explain, explain, negate, or, orRaw, testAndExplain, testAndExplain, testAndExplainRaw, testAndExplainRaw, testRaw, wrap
-
-
-
-
Field Detail
-
CMIN
public static final FormalArg<Comparable> CMIN
-
SFARGS
public static final FormalArgs SFARGS
-
CFARGS
public static final FormalArgs CFARGS
-
FACTORY
public static final Factory<IsGreaterThan> FACTORY
-
-
Method Detail
-
getValueClass
public Class<T> getValueClass()
- Specified by:
getValueClassin interfaceChecker<T extends Comparable<T>>- Returns:
- The class of tested values.
-
test
public boolean test(T value)
- Specified by:
testin interfaceChecker<T extends Comparable<T>>- Specified by:
testin interfacePredicate<T extends Comparable<T>>
-
explain
public String explain(boolean result, String arg)
Description copied from interface:CheckerExplains the conditions at which a positive or negative result is obtained.- Specified by:
explainin interfaceChecker<T extends Comparable<T>>- Parameters:
result- The result to explain.arg- The argument name to use in explanations.- Returns:
- A string explaining the conditions leading to
result.
-
getMin
public T getMin()
-
from
public static IsGreaterThan<String> from(String min)
-
from
public static IsGreaterThan<Character> from(char min)
-
from
public static IsGreaterThan<Double> from(double min)
-
from
public static IsGreaterThan<Float> from(float min)
-
from
public static IsGreaterThan<Long> from(long min)
-
from
public static IsGreaterThan<Integer> from(int min)
-
from
public static IsGreaterThan<Short> from(short min)
-
from
public static IsGreaterThan<Byte> from(byte min)
-
-