Class Predicates<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Predicate<T>>
-
- com.norconex.commons.lang.function.Predicates<T>
-
- Type Parameters:
T
- type being put to the test
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Predicate<T>>
,Collection<Predicate<T>>
,Predicate<T>
,List<Predicate<T>>
,RandomAccess
public class Predicates<T> extends ArrayList<Predicate<T>> implements Predicate<T>
A list of
Predicate
instances, matched as a group. All supplied predicates must returntrue
for this one to returntrue
, unless the constructor is invoked with atrue
any
argument. In such case, any of the predicates must match to returntrue
.Any
null
predicates are simply ignored.- Since:
- 2.0.0
- Author:
- Pascal Essiembre
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description Predicates()
Predicates(boolean any)
Predicates(int initialCapacity)
Predicates(int initialCapacity, boolean any)
Predicates(Collection<Predicate<T>> predicates)
Predicates(Collection<Predicate<T>> predicates, boolean any)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
int
hashCode()
boolean
isAny()
boolean
test(T t)
String
toString()
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Constructor Detail
-
Predicates
public Predicates()
-
Predicates
public Predicates(boolean any)
-
Predicates
public Predicates(int initialCapacity)
-
Predicates
public Predicates(int initialCapacity, boolean any)
-
Predicates
public Predicates(Collection<Predicate<T>> predicates)
-
Predicates
public Predicates(Collection<Predicate<T>> predicates, boolean any)
-
-