Class AreIn

  • All Implemented Interfaces:
    Predicate<Collection<?>>

    public class AreIn
    extends KoryphePredicate<Collection<?>>
    An AreIn is a BiPredicate that checks if a provided Collection contains all the provided input values. There is also a nullOrEmptyAllowedValuesAccepted flag which defaults to true. If the provided allowedValues collection is null or empty, the flag's value will be used as the result for any input test.
    • Constructor Detail

      • AreIn

        public AreIn()
      • AreIn

        public AreIn​(Collection<?> allowedValues)
      • AreIn

        public AreIn​(Collection<?> allowedValues,
                     boolean nullOrEmptyAllowedValuesAccepted)
      • AreIn

        public AreIn​(Object... allowedValues)
    • Method Detail

      • setValues

        public void setValues​(Collection<?> allowedValues)
      • getAllowedValuesArray

        public Object[] getAllowedValuesArray()
      • setAllowedValues

        public void setAllowedValues​(Object[] allowedValuesArray)
      • getNullOrEmptyAllowedValuesAccepted

        public boolean getNullOrEmptyAllowedValuesAccepted()
      • setNullOrEmptyAllowedValuesAccepted

        public void setNullOrEmptyAllowedValuesAccepted​(boolean nullOrEmptyAllowedValuesAccepted)
      • test

        public boolean test​(Collection<?> input)