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<?>>
AnAreIn
is aBiPredicate
that checks if a providedCollection
contains 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 boolean
equals(Object obj)
Object[]
getAllowedValuesArray()
boolean
getNullOrEmptyAllowedValuesAccepted()
Collection<?>
getValues()
int
hashCode()
void
setAllowedValues(Object[] allowedValuesArray)
void
setNullOrEmptyAllowedValuesAccepted(boolean nullOrEmptyAllowedValuesAccepted)
void
setValues(Collection<?> allowedValues)
boolean
test(Collection<?> input)
String
toString()
-
-
-
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:
equals
in classKoryphePredicate<Collection<?>>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classKoryphePredicate<Collection<?>>
-
-