| Constructor and Description |
|---|
TimeIntervalPredicate(TimeUnit timeUnit,
long interval) |
| Modifier and Type | Method and Description |
|---|---|
ComparisonResult |
compareTo(Extractor<T,Boolean,C> other)
Compares two extractors
|
boolean |
equals(Object obj) |
Boolean |
extract(C context,
Map<C,Map<Extractor<T,? super Boolean,C>,? super Boolean>> cache,
T... obj)
Extracts value.
|
double |
getCost() |
int |
hashCode() |
boolean |
isContextDependent() |
Set<Integer> |
parameterIndices() |
public TimeIntervalPredicate(TimeUnit timeUnit, long interval)
public Boolean extract(C context, Map<C,Map<Extractor<T,? super Boolean,C>,? super Boolean>> cache, T... obj)
Extractorextract in interface Extractor<T,Boolean,C>context - Extraction context. Extraction context may provide source for constants for comparison
with object values.cache - Cache of values extracted from the source object for the given context.
Composite extractors can use cache to find already extracted values and to store extracted values.
For example extractor which extracts object area as obj.getWidth()*obj.getHeight() may find that width was already
extracted and getWidth() doesn't have to be invoked. So it invokes getHeight() and stores
returned value to the cache. It also calculates object area and stores it to the cache. A particular cache instance
is valid only for a particular obj array, i.e. it can be re-used between extractors but not between arguments.obj - Source objects.public Set<Integer> parameterIndices()
parameterIndices in interface Extractor<T,Boolean,C>public boolean isContextDependent()
isContextDependent in interface Extractor<T,Boolean,C>public ComparisonResult compareTo(Extractor<T,Boolean,C> other)
Extractorpublic double getCost()