Class ValidIntegerPredicate
- java.lang.Object
-
- de.hybris.platform.cmsfacades.common.predicate.ValidIntegerPredicate
-
- All Implemented Interfaces:
java.util.function.Predicate<java.lang.String>
public class ValidIntegerPredicate extends java.lang.Object implements java.util.function.Predicate<java.lang.String>Predicate to test if a given string is parsable into an Integer and that it matches lower and upper boundaries when set
-
-
Constructor Summary
Constructors Constructor Description ValidIntegerPredicate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanareMinAndMaxNull()Determine if both min and max are nullprotected java.lang.IntegergetMax()protected java.lang.IntegergetMin()protected booleanisGreaterOrEqualToMin(int num)If min is not null, determine if num is greater or equal to minprotected booleanisLessOrEqualToMax(int num)If max is not null, determine if num is less or equal to maxvoidsetMax(java.lang.Integer max)voidsetMin(java.lang.Integer min)booleantest(java.lang.String target)
-
-
-
Method Detail
-
test
public boolean test(java.lang.String target)
- Specified by:
testin interfacejava.util.function.Predicate<java.lang.String>
-
isGreaterOrEqualToMin
protected boolean isGreaterOrEqualToMin(int num)
If min is not null, determine if num is greater or equal to min
-
isLessOrEqualToMax
protected boolean isLessOrEqualToMax(int num)
If max is not null, determine if num is less or equal to max
-
areMinAndMaxNull
protected boolean areMinAndMaxNull()
Determine if both min and max are null
-
getMin
protected java.lang.Integer getMin()
-
setMin
public void setMin(java.lang.Integer min)
-
getMax
protected java.lang.Integer getMax()
-
setMax
public void setMax(java.lang.Integer max)
-
-