public class AndPredicate extends Predicate
AndPredicate wraps AndPredicate to
provide additional functionality like serializing to and from a Map and JSON formatted data.
See DelegatedMultiplePredicateContainer
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
The name of this
Predicate implementation |
| Constructor and Description |
|---|
AndPredicate(org.apache.commons.collections.Predicate predicate1,
org.apache.commons.collections.Predicate predicate2)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
evaluate(Object o) |
static AndPredicate |
fromMap(Map<String,Object> map)
Creates a new
AndPredicate using the given Map of data. |
org.apache.commons.collections.Predicate[] |
getPredicates() |
int |
hashCode() |
Map<String,Object> |
toMap()
|
public static final String NAME
Predicate implementationpublic AndPredicate(org.apache.commons.collections.Predicate predicate1,
org.apache.commons.collections.Predicate predicate2)
predicate1 - the first predicate to processpredicate2 - the second predicate to process (if the first one yields truepublic static AndPredicate fromMap(Map<String,Object> map)
AndPredicate using the given Map of data.
It is expected that the map contains a single Map.Entry where the key name
is "and" and the value is a Collection of Maps representing the contained
predicates.
AndPredicatepublic int hashCode()
public boolean equals(Object obj)
public boolean evaluate(Object o)
evaluate in interface org.apache.commons.collections.Predicatepublic org.apache.commons.collections.Predicate[] getPredicates()
getPredicates in interface org.apache.commons.collections.functors.PredicateDecoratorCopyright © 2022 Apache Software Foundation. All rights reserved.