Package com.google.gerrit.index.query
Class AndSource<T>
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.AndPredicate<T>
-
- com.google.gerrit.index.query.AndSource<T>
-
- All Implemented Interfaces:
DataSource<T>
,Matchable<T>
,Comparator<Predicate<T>>
- Direct Known Subclasses:
AndChangeSource
public class AndSource<T> extends AndPredicate<T> implements DataSource<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected DataSource<T>
source
-
Constructor Summary
Constructors Constructor Description AndSource(Predicate<T> that, IsVisibleToPredicate<T> isVisibleToPredicate, int start, IndexConfig indexConfig)
AndSource(Predicate<T> that, IsVisibleToPredicate<T> isVisibleToPredicate, IndexConfig indexConfig)
AndSource(Collection<? extends Predicate<T>> that, IndexConfig indexConfig)
AndSource(Collection<? extends Predicate<T>> that, IsVisibleToPredicate<T> isVisibleToPredicate, int start, IndexConfig indexConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCardinality()
Returns an estimate of the number of results fromDataSource.read()
.boolean
isMatchable()
boolean
match(T object)
Does this predicate match this object?ResultSet<T>
read()
Returns read from the index and return the results.ResultSet<FieldBundle>
readRaw()
Returns read from the index and return the raw results.protected List<T>
transformBuffer(List<T> buffer)
-
Methods inherited from class com.google.gerrit.index.query.AndPredicate
compare, copy, equals, getChild, getChildCount, getChildren, getCost, hashCode, 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
-
-
-
-
Field Detail
-
source
protected final DataSource<T> source
-
-
Constructor Detail
-
AndSource
public AndSource(Collection<? extends Predicate<T>> that, IndexConfig indexConfig)
-
AndSource
public AndSource(Predicate<T> that, IsVisibleToPredicate<T> isVisibleToPredicate, IndexConfig indexConfig)
-
AndSource
public AndSource(Predicate<T> that, IsVisibleToPredicate<T> isVisibleToPredicate, int start, IndexConfig indexConfig)
-
AndSource
public AndSource(Collection<? extends Predicate<T>> that, IsVisibleToPredicate<T> isVisibleToPredicate, int start, IndexConfig indexConfig)
-
-
Method Detail
-
read
public ResultSet<T> read()
Description copied from interface:DataSource
Returns read from the index and return the results.- Specified by:
read
in interfaceDataSource<T>
-
readRaw
public ResultSet<FieldBundle> readRaw()
Description copied from interface:DataSource
Returns read from the index and return the raw results.- Specified by:
readRaw
in interfaceDataSource<T>
-
isMatchable
public boolean isMatchable()
- Overrides:
isMatchable
in classAndPredicate<T>
-
match
public boolean match(T object)
Description copied from interface:Matchable
Does this predicate match this object?
-
getCardinality
public int getCardinality()
Description copied from interface:DataSource
Returns an estimate of the number of results fromDataSource.read()
.- Specified by:
getCardinality
in interfaceDataSource<T>
-
-