public abstract class ComparableValue extends BaseCriteria
Comparable
valuesConstructor and Description |
---|
ComparableValue(String attributeName,
AttributeType type)
Constructor
|
ComparableValue(String attributeName,
Object value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
execute(Element e,
Map<String,AttributeExtractor> attributeExtractors)
Test this criteria against a cache element
|
protected abstract boolean |
executeComparable(Comparable attributeValue)
Execute this criteria for the given
Comparable attribute value |
protected abstract boolean |
executeComparableString(Comparable attributeValue)
Execute this criteria for the given
Comparable strin type attribute value |
String |
getAttributeName()
Attribute name.
|
AttributeType |
getType()
Attribute type.
|
protected static int |
luceneStringCompare(String s1,
String s2)
Perform a Lucene compatible case insensitive string comparison.
|
and, not, or
public ComparableValue(String attributeName, Object value)
attributeName
- attribute namevalue
- comparable value (used to infer type)public ComparableValue(String attributeName, AttributeType type)
attributeName
- attribute nametype
- the expeceted type for values evaluated by this criteriapublic String getAttributeName()
public AttributeType getType()
public boolean execute(Element e, Map<String,AttributeExtractor> attributeExtractors)
e
- cache elementattributeExtractors
- map of attribute extractors to attribute value namesprotected abstract boolean executeComparable(Comparable attributeValue)
Comparable
attribute valueattributeValue
- Comparable attribute valueprotected abstract boolean executeComparableString(Comparable attributeValue)
Comparable
strin type attribute valueattributeValue
- Comparable attribute valueCopyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.