Class IsGreaterThan<T extends Comparable<T>>
- java.lang.Object
-
- cdc.util.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 cdc.util.args.FormalArgsCFARGSstatic cdc.util.args.FormalArg<Class>CLASSstatic cdc.util.args.FormalArg<Comparable>CMINstatic cdc.util.args.Factory<IsGreaterThan>FACTORYstatic cdc.util.args.FormalArgsSFARGSstatic cdc.util.args.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
-
-
-
-
Field Detail
-
CLASS
public static final cdc.util.args.FormalArg<Class> CLASS
-
SMIN
public static final cdc.util.args.FormalArg<String> SMIN
-
CMIN
public static final cdc.util.args.FormalArg<Comparable> CMIN
-
SFARGS
public static final cdc.util.args.FormalArgs SFARGS
-
CFARGS
public static final cdc.util.args.FormalArgs CFARGS
-
FACTORY
public static final cdc.util.args.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)
-
-