Class ChangeStatusPredicate
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.OperatorPredicate<I>
-
- com.google.gerrit.index.query.IndexPredicate<ChangeData>
-
- com.google.gerrit.server.query.change.ChangeIndexPredicate
-
- com.google.gerrit.server.query.change.ChangeStatusPredicate
-
- All Implemented Interfaces:
Matchable<ChangeData>
public final class ChangeStatusPredicate extends ChangeIndexPredicate
Predicate for aChange.Status
.The actual name of this operator can differ, it usually comes as
status:
but may also beis:
to help do-what-i-meanery for end-users searching for changes. Either operator name has the same meaning.Status names are looked up by prefix case-insensitively.
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.index.query.OperatorPredicate
name, value
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
canonicalize(Change.Status status)
static Predicate<ChangeData>
closed()
boolean
equals(Object other)
static ChangeStatusPredicate
forStatus(Change.Status status)
int
getCost()
Change.Status
getStatus()
Get the status for this predicate.int
hashCode()
boolean
match(ChangeData object)
Does this predicate match this object?static Predicate<ChangeData>
open()
static Predicate<ChangeData>
parse(String value)
String
toString()
-
Methods inherited from class com.google.gerrit.server.query.change.ChangeIndexPredicate
none
-
Methods inherited from class com.google.gerrit.index.query.IndexPredicate
getField, getType
-
Methods inherited from class com.google.gerrit.index.query.OperatorPredicate
copy, getOperator, getValue
-
Methods inherited from class com.google.gerrit.index.query.Predicate
and, and, any, asMatchable, estimateCost, getChild, getChildCount, getChildren, getLeafCount, isMatchable, not, or, or
-
-
-
-
Method Detail
-
canonicalize
public static String canonicalize(Change.Status status)
-
parse
public static Predicate<ChangeData> parse(String value)
-
open
public static Predicate<ChangeData> open()
-
closed
public static Predicate<ChangeData> closed()
-
forStatus
public static ChangeStatusPredicate forStatus(Change.Status status)
-
getStatus
public Change.Status getStatus()
Get the status for this predicate.- Returns:
- the status, or null if this predicate is intended to never match any changes.
-
match
public boolean match(ChangeData object)
Description copied from interface:Matchable
Does this predicate match this object?
-
getCost
public int getCost()
- Returns:
- a cost estimate to run this predicate, higher figures cost more.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classOperatorPredicate<ChangeData>
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classOperatorPredicate<ChangeData>
-
toString
public String toString()
- Overrides:
toString
in classOperatorPredicate<ChangeData>
-
-