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. 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 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<?>>
-
-