|
CoherenceTM v3.4 Copyright© 2000-2008 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.util.filter.ExtractorFilter
com.tangosol.util.filter.ComparisonFilter
public abstract class ComparisonFilter
Filter which compares the result of a method invocation with a value.
| Field Summary | |
|---|---|
protected java.lang.Object |
m_oValue
The value to compare to. |
| Fields inherited from class com.tangosol.util.filter.ExtractorFilter |
|---|
EVAL_COST, m_extractor |
| Constructor Summary | |
|---|---|
ComparisonFilter()
Default constructor (necessary for the ExternalizableLite interface). |
|
ComparisonFilter(java.lang.String sMethod,
java.lang.Object oValue)
Construct a ComparisonFilter. |
|
ComparisonFilter(ValueExtractor extractor,
java.lang.Object oValue)
Construct a ComparisonFilter. |
|
| Method Summary | |
|---|---|
static int |
calculateIteratorEffectiveness(int cKeys)
Helper method to calculate effectiveness (or rather ineffectiveness) of a simple iteration against a key set that has to be performed due to an absence of corresponding index. |
protected int |
calculateMatchEffectiveness(java.util.Map mapIndexes,
java.util.Set setKeys)
Helper method to calculate effectiveness for ComparisonFilters that need no more than a single index match in order to retrieve all necessary keys to perform the applyIndex() operation. |
protected int |
calculateRangeEffectiveness(java.util.Map mapIndexes,
java.util.Set setKeys)
Helper method to calculate effectiveness for ComparisonFilters that need a range of values from an index in order to retrieve all necessary keys to perform the applyIndex() operation. |
boolean |
equals(java.lang.Object o)
Compare the ComparisonFilter with another object to determine equality. |
java.lang.Object |
getValue()
Get the object to compare the reflection result with. |
int |
hashCode()
Determine a hash value for the ComparisonFilter object according to the general Object.hashCode() contract. |
void |
readExternal(java.io.DataInput in)
Restore the contents of this object by loading the object's state from the passed DataInput object. |
void |
readExternal(PofReader in)
Restore the contents of a user type instance by reading its state using the specified PofReader object. |
java.lang.String |
toString()
Return a human-readable description for this Filter. |
void |
writeExternal(java.io.DataOutput out)
Save the contents of this object by storing the object's state into the passed DataOutput object. |
void |
writeExternal(PofWriter out)
Save the contents of a POF user type instance by writing its state using the specified PofWriter object. |
| Methods inherited from class com.tangosol.util.filter.ExtractorFilter |
|---|
evaluate, evaluateEntry, evaluateExtracted, extract, getValueExtractor |
| Methods inherited from class com.tangosol.util.BitHelper |
|---|
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, toBitString, toBitString, toBitString |
| Field Detail |
|---|
protected java.lang.Object m_oValue
| Constructor Detail |
|---|
public ComparisonFilter()
public ComparisonFilter(ValueExtractor extractor,
java.lang.Object oValue)
extractor - the ComparisonFilter to use by this filteroValue - the object to compare the result with
public ComparisonFilter(java.lang.String sMethod,
java.lang.Object oValue)
sMethod - the name of the method to invoke via reflectionoValue - the object to compare the result with| Method Detail |
|---|
public java.lang.Object getValue()
protected int calculateMatchEffectiveness(java.util.Map mapIndexes,
java.util.Set setKeys)
mapIndexes - the available MapIndex objects keyed by the related
ValueExtractor; read-onlysetKeys - the set of keys that will be filtered; read-only
protected int calculateRangeEffectiveness(java.util.Map mapIndexes,
java.util.Set setKeys)
mapIndexes - the available MapIndex objects keyed by the related
ValueExtractor; read-onlysetKeys - the set of keys that will be filtered; read-only
public static int calculateIteratorEffectiveness(int cKeys)
cKeys - the number of keys to iterate throughpublic boolean equals(java.lang.Object o)
public int hashCode()
Object.hashCode() contract.
public java.lang.String toString()
public void readExternal(java.io.DataInput in)
throws java.io.IOException
readExternal in interface ExternalizableLitereadExternal in class ExtractorFilterin - the DataInput stream to read data from in order to restore
the state of this object
java.io.IOException - if an I/O exception occurs
java.io.NotActiveException - if the object is not in its initial
state, and therefore cannot be deserialized into
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
writeExternal in interface ExternalizableLitewriteExternal in class ExtractorFilterout - the DataOutput stream to write the state of this object to
java.io.IOException - if an I/O exception occurs
public void readExternal(PofReader in)
throws java.io.IOException
readExternal in interface PortableObjectreadExternal in class ExtractorFilterin - the PofReader from which to read the object's state
java.io.IOException - if an I/O error occurs
public void writeExternal(PofWriter out)
throws java.io.IOException
writeExternal in interface PortableObjectwriteExternal in class ExtractorFilterout - the PofWriter to which to write the object's state
java.io.IOException - if an I/O error occurs
|
CoherenceTM v3.4 Copyright© 2000-2008 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||