Package com.google.gerrit.index.query
Class OrPredicate<T>
java.lang.Object
com.google.gerrit.index.query.Predicate<T>
com.google.gerrit.index.query.OrPredicate<T>
- All Implemented Interfaces:
Matchable<T>
- Direct Known Subclasses:
BranchSetIndexPredicate,LabelPredicate,OrCardinalPredicate,OrSource,ParentProjectPredicate
Requires one predicate to be true.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gerrit.index.query.Predicate
Predicate.Any<T> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOrPredicate(Predicate<T>... that) protectedOrPredicate(Collection<? extends Predicate<T>> that) -
Method Summary
Modifier and TypeMethodDescriptioncopy(Collection<? extends Predicate<T>> children) Create a copy of this predicate, with new children.booleangetChild(int i) Same asgetChildren().get(i)final intSame asgetChildren().size()Get the children of this predicate, if any.intgetCost()Returns a cost estimate to run this predicate, higher figures cost more.inthashCode()booleanbooleanDoes 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
-
Constructor Details
-
OrPredicate
-
OrPredicate
-
-
Method Details
-
getChildren
Description copied from class:PredicateGet the children of this predicate, if any.- Overrides:
getChildrenin classPredicate<T>
-
getChildCount
public final int getChildCount()Description copied from class:PredicateSame asgetChildren().size()- Overrides:
getChildCountin classPredicate<T>
-
getChild
Description copied from class:PredicateSame asgetChildren().get(i) -
copy
Description copied from class:PredicateCreate a copy of this predicate, with new children. -
isMatchable
public boolean isMatchable()- Overrides:
isMatchablein classPredicate<T>
-
match
Description copied from interface:MatchableDoes this predicate match this object? -
getCost
public int getCost()Description copied from interface:MatchableReturns a cost estimate to run this predicate, higher figures cost more. -
hashCode
public int hashCode() -
equals
-
toString
-