Class AreIn
- java.lang.Object
-
- uk.gov.gchq.koryphe.predicate.KoryphePredicate<Collection<?>>
-
- uk.gov.gchq.koryphe.impl.predicate.AreIn
-
- All Implemented Interfaces:
Predicate<Collection<?>>
public class AreIn extends KoryphePredicate<Collection<?>>
AnAreInis aBiPredicatethat checks if a providedCollectioncontains all the provided input values. An optional nullOrEmptyAllowedValuesAccepted flag (defaults to true) can determine whether the provided allowedValues collection can be null or empty. The return value for any null or empty input will be equal to the value of the nullOrEmptyAllowedValuesAccepted flag.
-
-
Constructor Summary
Constructors Constructor Description AreIn()AreIn(Object... allowedValues)AreIn(Collection<?> allowedValues)AreIn(Collection<?> allowedValues, boolean nullOrEmptyAllowedValuesAccepted)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Object[]getAllowedValuesArray()booleangetNullOrEmptyAllowedValuesAccepted()Collection<?>getValues()inthashCode()voidsetAllowedValues(Object[] allowedValuesArray)voidsetNullOrEmptyAllowedValuesAccepted(boolean nullOrEmptyAllowedValuesAccepted)voidsetValues(Collection<?> allowedValues)booleantest(Collection<?> input)StringtoString()
-
-
-
Constructor Detail
-
AreIn
public AreIn()
-
AreIn
public AreIn(Collection<?> allowedValues)
-
AreIn
public AreIn(Collection<?> allowedValues, boolean nullOrEmptyAllowedValuesAccepted)
-
AreIn
public AreIn(Object... allowedValues)
-
-
Method Detail
-
getValues
public Collection<?> getValues()
-
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)
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classKoryphePredicate<Collection<?>>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classKoryphePredicate<Collection<?>>
-
-