Package net.shibboleth.metadata.pipeline
Class AtLeastCollectionPredicate<T>
java.lang.Object
net.shibboleth.metadata.pipeline.AtLeastCollectionPredicate<T>
- Type Parameters:
T- type of item element in the collection
- All Implemented Interfaces:
Predicate<Collection<T>>
@ThreadSafe
public class AtLeastCollectionPredicate<T>
extends Object
implements Predicate<Collection<T>>
A
Predicate which returns true if and only if the number of elements
in the supplied collection is at least the configured minimum value.- Since:
- 0.9.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intMinimum element count which will satisfy the condition. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intReturns the minimum number of elements which will result in atrueresult.voidsetMinimum(int min) Sets the minimum number of elements which will result in atrueresult.booleantest(Collection<T> input)
-
Field Details
-
minimum
private int minimumMinimum element count which will satisfy the condition. Default value: 0.
-
-
Constructor Details
-
AtLeastCollectionPredicate
public AtLeastCollectionPredicate()
-
-
Method Details
-
getMinimum
public final int getMinimum()Returns the minimum number of elements which will result in atrueresult.- Returns:
- the minimum number of elements which will result in a
trueresult.
-
setMinimum
public void setMinimum(int min) Sets the minimum number of elements which will result in atrueresult.- Parameters:
min- minimum number of elements which will result in atrueresult.
-
test
-