Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean areMinAndMaxNull()
      Determine if both min and max are null
      protected java.lang.Integer getMax()  
      protected java.lang.Integer getMin()  
      protected boolean isGreaterOrEqualToMin​(int num)
      If min is not null, determine if num is greater or equal to min
      protected boolean isLessOrEqualToMax​(int num)
      If max is not null, determine if num is less or equal to max
      void setMax​(java.lang.Integer max)  
      void setMin​(java.lang.Integer min)  
      boolean test​(java.lang.String target)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Predicate

        and, negate, or
    • Constructor Detail

      • ValidIntegerPredicate

        public ValidIntegerPredicate()
    • Method Detail

      • test

        public boolean test​(java.lang.String target)
        Specified by:
        test in interface java.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)