Class ValidIntegerPredicate

java.lang.Object
de.hybris.platform.cmsfacades.common.predicate.ValidIntegerPredicate
All Implemented Interfaces:
Predicate<String>

public class ValidIntegerPredicate extends Object implements Predicate<String>
Predicate to test if a given string is parsable into an Integer and that it matches lower and upper boundaries when set
  • Constructor Details

    • ValidIntegerPredicate

      public ValidIntegerPredicate()
  • Method Details

    • test

      public boolean test(String target)
      Specified by:
      test in interface Predicate<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 Integer getMin()
    • setMin

      public void setMin(Integer min)
    • getMax

      protected Integer getMax()
    • setMax

      public void setMax(Integer max)