Class ReviewerPredicate

All Implemented Interfaces:
HasCardinality, Matchable<ChangeData>

public class ReviewerPredicate extends ChangeIndexPredicate implements HasCardinality
  • Field Details

  • Method Details

    • forState

      protected static Predicate<ChangeData> forState(Account.Id id, ReviewerStateInternal state)
    • reviewer

      protected static Predicate<ChangeData> reviewer(Account.Id id)
    • cc

      protected static Predicate<ChangeData> cc(Account.Id id)
    • getAccountId

      protected Account.Id getAccountId()
    • match

      public boolean match(ChangeData cd)
      Description copied from class: IndexPredicate
      This method matches documents without calling an index subsystem. For primitive fields (e.g. integer, long) , the matching logic is consistent across this method and all known index implementations. For text fields (i.e. prefix and full-text) the semantics vary between this implementation and known index implementations:
    • Prefix: Lucene as well as IndexPredicate.match(Object) matches terms as true prefixes (prefix:foo -> `foo bar` matches, but `baz foo bar` does not match). The index implementation at Google tokenizes both the query and the indexed text and matches tokens individually (prefix:fo ba -> `baz foo bar` matches).
    • Full text: Lucene uses a PhraseQuery to search for terms in full text fields in-order. The index implementation at Google as well as IndexPredicate.match(Object) tokenizes both the query and the indexed text and matches tokens individually.
    • Specified by:
      match in interface Matchable<ChangeData>
      Overrides:
      match in class IndexPredicate<ChangeData>
      Returns:
      true if the predicate matches the provided I.
    • getCardinality

      public int getCardinality()
      Description copied from interface: HasCardinality
      Returns an estimate of the number of results a source can return.
      Specified by:
      getCardinality in interface HasCardinality