public abstract class ComparisonPredicate<T,V,C> extends ExtractorBase<T,Boolean,C> implements Predicate<T,C>, Mappable<T,Boolean,C>, BinaryExtractor<T,V,C>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ComparisonPredicate.PromotionLevel |
| Modifier and Type | Field and Description |
|---|---|
protected Extractor<T,V,C> |
leftExtractor |
protected Set<Integer> |
parameterIndices |
protected Extractor<T,V,C> |
rightExtractor |
cost, costUnit, initialCost, invocations, nanos, totalCost| Modifier | Constructor and Description |
|---|---|
protected |
ComparisonPredicate(double initialCost,
TimeUnit costUnit,
Extractor<T,V,C> leftExtractor,
Extractor<T,V,C> rightExtractor) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
compare(double n1,
double n2) |
protected abstract boolean |
compare(float n1,
float n2) |
protected abstract boolean |
compare(int n1,
int n2) |
protected abstract boolean |
compare(long n1,
long n2) |
protected abstract boolean |
compare(Object o1,
Object o2) |
boolean |
equals(Object obj) |
protected Boolean |
extractInternal(C context,
Map<C,Map<Extractor<T,? super Boolean,C>,? super Boolean>> cache,
T... obj) |
double |
getCost() |
Extractor<T,V,C> |
getLeftExtractor() |
Extractor<T,V,C> |
getRightExtractor() |
int |
hashCode() |
boolean |
isContextDependent() |
Extractor<T,Boolean,C> |
map(int[] map)
Applies mapping to extractor.
|
protected abstract Extractor<T,Boolean,C> |
newInstance(Extractor<T,V,C> leftExtractor,
Extractor<T,V,C> rightExtractor) |
protected boolean |
operandsAreEqual(ComparisonPredicate<T,V,C> other) |
protected boolean |
operandsAreReverseEqual(ComparisonPredicate<T,V,C> other) |
Set<Integer> |
parameterIndices() |
protected ComparisonPredicate.PromotionLevel |
promote(Number n1,
Number n2) |
String |
toString() |
compareTo, createCacheEntry, extractprotected Extractor<T,V,C> leftExtractor
protected Extractor<T,V,C> rightExtractor
protected Set<Integer> parameterIndices
public Set<Integer> parameterIndices()
parameterIndices in interface Extractor<T,Boolean,C>protected boolean operandsAreEqual(ComparisonPredicate<T,V,C> other)
protected boolean operandsAreReverseEqual(ComparisonPredicate<T,V,C> other)
public boolean isContextDependent()
isContextDependent in interface Extractor<T,Boolean,C>protected Boolean extractInternal(C context, Map<C,Map<Extractor<T,? super Boolean,C>,? super Boolean>> cache, T... obj)
extractInternal in class ExtractorBase<T,Boolean,C>protected abstract boolean compare(int n1, int n2)
protected abstract boolean compare(long n1, long n2)
protected abstract boolean compare(float n1, float n2)
protected abstract boolean compare(double n1, double n2)
protected ComparisonPredicate.PromotionLevel promote(Number n1, Number n2)
public double getCost()
public Extractor<T,Boolean,C> map(int[] map)
Mappableprotected abstract Extractor<T,Boolean,C> newInstance(Extractor<T,V,C> leftExtractor, Extractor<T,V,C> rightExtractor)
public Extractor<T,V,C> getLeftExtractor()
getLeftExtractor in interface BinaryExtractor<T,V,C>public Extractor<T,V,C> getRightExtractor()
getRightExtractor in interface BinaryExtractor<T,V,C>