Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.util.filter
Class BetweenFilter

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.BitHelper
          extended by com.tangosol.util.ExternalizableHelper
              extended by com.tangosol.util.filter.ArrayFilter
                  extended by com.tangosol.util.filter.AllFilter
                      extended by com.tangosol.util.filter.AndFilter
                          extended by com.tangosol.util.filter.BetweenFilter

All Implemented Interfaces:
ExternalizableLite, PortableObject, Filter, EntryFilter, IndexAwareFilter, QueryRecorderFilter, java.io.Serializable

public class BetweenFilter
extends AndFilter

Filter which compares the result of a method invocation with a value for "Between" condition. We use the standard ISO/IEC 9075:1992 semantic, according to which "X between Y and Z" is equivalent to "X >= Y && X <= Z". In a case when either result of a method invocation or a value to compare are equal to null, the evaluate test yields false. This approach is equivalent to the way the NULL values are handled by SQL.

Author:
cp/gg 2002.10.29

Nested Class Summary

 

Nested classes/interfaces inherited from class com.tangosol.util.filter.ArrayFilter
ArrayFilter.WeightedFilter

 

Field Summary

 

Fields inherited from class com.tangosol.util.filter.ArrayFilter
m_aFilter

 

Constructor Summary
BetweenFilter()
          Default constructor (necessary for the ExternalizableLite interface).
BetweenFilter(java.lang.String sMethod, java.lang.Comparable oFrom, java.lang.Comparable oTo)
          Construct a BetweenFilter for testing "Between" condition.
BetweenFilter(java.lang.String sMethod, double dFrom, double dTo)
          Construct a BetweenFilter for testing "Between" condition.
BetweenFilter(java.lang.String sMethod, float fFrom, float fTo)
          Construct a BetweenFilter for testing "Between" condition.
BetweenFilter(java.lang.String sMethod, int iFrom, int iTo)
          Construct a BetweenFilter for testing "Between" condition.
BetweenFilter(java.lang.String sMethod, long lFrom, long lTo)
          Construct a BetweenFilter for testing "Between" condition.
BetweenFilter(ValueExtractor extractor, java.lang.Comparable oFrom, java.lang.Comparable oTo)
          Construct a BetweenFilter for testing "Between" condition.

 

Method Summary
 Filter applyIndex(java.util.Map mapIndexes, java.util.Set setKeys)
          Filter remaining keys using a Map of available indexes.

 

Methods inherited from class com.tangosol.util.filter.AllFilter
applyIndex, calculateEffectiveness, evaluate, evaluateEntry

 

Methods inherited from class com.tangosol.util.filter.ArrayFilter
applyFilter, calculateFilters, equals, evaluateEntry, evaluateFilter, explain, getFilters, hashCode, readExternal, readExternal, toString, trace, trace, writeExternal, writeExternal

 

Methods inherited from class com.tangosol.util.BitHelper
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString, toBytes, toBytes, toBytes, toBytes, toInt, toInt, toLong, toLong

 

Constructor Detail

BetweenFilter

public BetweenFilter()
Default constructor (necessary for the ExternalizableLite interface).

BetweenFilter

public BetweenFilter(java.lang.String sMethod,
                     java.lang.Comparable oFrom,
                     java.lang.Comparable oTo)
Construct a BetweenFilter for testing "Between" condition.
Parameters:
sMethod - the name of the method to invoke via reflection
oFrom - the object to compare the "Greater or Equals" boundary with
oTo - the object to compare the "Less or Equals" boundary with

BetweenFilter

public BetweenFilter(ValueExtractor extractor,
                     java.lang.Comparable oFrom,
                     java.lang.Comparable oTo)
Construct a BetweenFilter for testing "Between" condition.
Parameters:
extractor - the ValueExtractor to use by this filter
oFrom - the object to compare the "Greater or Equals" boundary with
oTo - the object to compare the "Less or Equals" boundary with

BetweenFilter

public BetweenFilter(java.lang.String sMethod,
                     int iFrom,
                     int iTo)
Construct a BetweenFilter for testing "Between" condition.
Parameters:
sMethod - the name of the method to invoke via reflection
iFrom - the integer value to compare the "Greater or Equals" boundary with
iTo - the integer value to compare the "Less or Equals" boundary with

BetweenFilter

public BetweenFilter(java.lang.String sMethod,
                     long lFrom,
                     long lTo)
Construct a BetweenFilter for testing "Between" condition.
Parameters:
sMethod - the name of the method to invoke via reflection
lFrom - the long value to compare the "Greater or Equals" boundary with
lTo - the long value to compare the "Less or Equals" boundary with

BetweenFilter

public BetweenFilter(java.lang.String sMethod,
                     float fFrom,
                     float fTo)
Construct a BetweenFilter for testing "Between" condition.
Parameters:
sMethod - the name of the method to invoke via reflection
fFrom - the float value to compare the "Greater or Equals" boundary with
fTo - the float value to compare the "Less or Equals" boundary with

BetweenFilter

public BetweenFilter(java.lang.String sMethod,
                     double dFrom,
                     double dTo)
Construct a BetweenFilter for testing "Between" condition.
Parameters:
sMethod - the name of the method to invoke via reflection
dFrom - the double value to compare the "Greater or Equals" boundary with
dTo - the double value to compare the "Less or Equals" boundary with

Method Detail

applyIndex

public Filter applyIndex(java.util.Map mapIndexes,
                         java.util.Set setKeys)
Filter remaining keys using a Map of available indexes.

The filter is responsible for removing all keys from the passed set of keys that the applicable indexes can prove should be filtered. If the filter does not fully evaluate the remaining keys using just the index information, it must return a filter (which may be an EntryFilter) that can complete the task using an iterating implementation. If, on the other hand, the filter does fully evaluate the remaining keys using just the index information, then it should return null to indicate that no further filtering is necessary.

Specified by:
applyIndex in interface IndexAwareFilter
Overrides:
applyIndex in class ArrayFilter
Parameters:
mapIndexes - the available MapIndex objects keyed by the related ValueExtractor; read-only
setKeys - the mutable set of keys that remain to be filtered
Returns:
a Filter object (which may be an EntryFilter) that can be used to process the remaining keys, or null if no additional filter processing is necessary

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.