Package com.google.gerrit.index.query
Class AndPredicate<T>
java.lang.Object
com.google.gerrit.index.query.Predicate<T>
com.google.gerrit.index.query.AndPredicate<T>
- All Implemented Interfaces:
Matchable<T>
,Comparator<Predicate<T>>
- Direct Known Subclasses:
AndCardinalPredicate
,AndSource
,IsWatchedByPredicate
Requires all predicates to be true.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gerrit.index.query.Predicate
Predicate.Any<T>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AndPredicate
(Predicate<T>... that) protected
AndPredicate
(Collection<? extends Predicate<T>> that) -
Method Summary
Modifier and TypeMethodDescriptionint
copy
(Collection<? extends Predicate<T>> children) Create a copy of this predicate, with new children.boolean
getChild
(int i) Same asgetChildren().get(i)
final int
Same asgetChildren().size()
Get the children of this predicate, if any.int
getCost()
Returns a cost estimate to run this predicate, higher figures cost more.int
hashCode()
boolean
boolean
Does this predicate match this object?toString()
Methods inherited from class com.google.gerrit.index.query.Predicate
and, and, any, asMatchable, estimateCost, getFlattenedPredicateList, getLeafCount, getPredicateString, isLeaf, not, or, or, supportedForQueries
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
AndPredicate
-
AndPredicate
-
-
Method Details
-
getChildren
Description copied from class:Predicate
Get the children of this predicate, if any.- Overrides:
getChildren
in classPredicate<T>
-
getChildCount
public final int getChildCount()Description copied from class:Predicate
Same asgetChildren().size()
- Overrides:
getChildCount
in classPredicate<T>
-
getChild
Description copied from class:Predicate
Same asgetChildren().get(i)
-
copy
Description copied from class:Predicate
Create a copy of this predicate, with new children. -
isMatchable
public boolean isMatchable()- Overrides:
isMatchable
in classPredicate<T>
-
match
Description copied from interface:Matchable
Does this predicate match this object? -
getCost
public int getCost()Description copied from interface:Matchable
Returns a cost estimate to run this predicate, higher figures cost more. -
hashCode
public int hashCode() -
equals
-
compare
- Specified by:
compare
in interfaceComparator<T>
-
toString
-