Class AndPredicate<T>
java.lang.Object
com._1c.g5.modeling.xtext.scoping.AndPredicate<T>
- All Implemented Interfaces:
com.google.common.base.Predicate<T>
,Predicate<T>
Special implementation of
Predicate
. Returns a predicate that evaluates to true if each of its components
evaluates to true. The components are evaluated in order, and evaluation will be "short-circuited" as soon as a false
predicate is found. It defensively copies the iterable passed in, so future changes to it won't alter the behavior
of this predicate. If components is empty, the returned predicate will always evaluate to true.-
Constructor Summary
ConstructorsConstructorDescriptionAndPredicate
(com.google.common.base.Predicate<T> predicate) ConstructorAndPredicate
(Collection<com.google.common.base.Predicate<T>> predicates) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPredicate
(com.google.common.base.Predicate<T> predicate) Adds predicate for evaluatingboolean
Collection<com.google.common.base.Predicate<T>>
Gets all containing predicatesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.common.base.Predicate
equals, test
-
Constructor Details
-
AndPredicate
Constructor- Parameters:
predicates
- initial collection of predicates, can't benull
-
AndPredicate
Constructor- Parameters:
predicates
- initial predicate, can't benull
-
-
Method Details
-
apply
- Specified by:
apply
in interfacecom.google.common.base.Predicate<T>
-
addPredicate
Adds predicate for evaluating- Parameters:
predicate
- adding predicate, can't benull
-
getPredicates
Gets all containing predicates- Returns:
- collection of the containing predicates, never
null
-