public class OrPredicate extends Predicate
OrPredicate
wraps OrPredicate
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 |
---|
OrPredicate(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 OrPredicate |
fromMap(Map<String,Object> map)
Creates a new
OrPredicate 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 OrPredicate(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 false
public static OrPredicate fromMap(Map<String,Object> map)
OrPredicate
using the given Map
of data.
It is expected that the map contains a single Map.Entry
where the key name
is "or" and the value is a Collection
of Map
s representing the contained
predicates.
OrPredicate
public int hashCode()
public boolean equals(Object obj)
public boolean evaluate(Object o)
evaluate
in interface org.apache.commons.collections.Predicate
public org.apache.commons.collections.Predicate[] getPredicates()
getPredicates
in interface org.apache.commons.collections.functors.PredicateDecorator
Copyright © 2022 Apache Software Foundation. All rights reserved.