Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util.filter
Class ValueChangeEventFilter

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.util.BitHelper
              com.tangosol.util.ExternalizableHelper
                  com.tangosol.util.filter.ExtractorFilter
                      com.tangosol.util.filter.ValueChangeEventFilter

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

    public class ValueChangeEventFilter

extends ExtractorFilter
implements Filter

Filter which evaluates the content of a MapEvent values based on the specified value extractor. This filter evaluates to true only for update events that change the value of an extracted attribute.

Example: a filter that evaluates to true if there is an update to an Employee object that changes a value of the LastName property.

       new ValueChangeEventFilter("LastName");

Since:
  Coherence 2.3
Author:
  gg 2003.09.30
See Also:
  `MapEventFilter`

Field Summary

Fields inherited from class com.tangosol.util.filter.ExtractorFilter
`EVAL_COST, m_extractor`

Constructor Summary
`ValueChangeEventFilter()` Default constructor (necessary for the ExternalizableLite interface).
`ValueChangeEventFilter(java.lang.String sMethod)` Construct a ValueChangeEventFilter that evaluates MapEvent values based on the specified method name.
`ValueChangeEventFilter(ValueExtractor extractor)` Construct a ValueChangeEventFilter that evaluates MapEvent values based on the specified extractor.

Method Summary
`boolean` | `equals(java.lang.Object o)` Compare the ValueChangeEventFilter with another object to determine equality.
`boolean` | `evaluate(java.lang.Object o)` Apply the test to the object.
`protected boolean` | `evaluateExtracted(java.lang.Object oExtracted)` Evaluate the specified extracted value.
`int` | `hashCode()` Determine a hash value for the ValueChangeEventFilter object according to the general `Object.hashCode()` contract.
`java.lang.String` | `toString()` Return a human-readable description for this Filter.

Methods inherited from class com.tangosol.util.filter.ExtractorFilter
`evaluateEntry, extract, getValueExtractor, readExternal, readExternal, 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`

Constructor Detail

### ValueChangeEventFilter

    public ValueChangeEventFilter()

  Default constructor (necessary for the ExternalizableLite interface).

### ValueChangeEventFilter

    public ValueChangeEventFilter(ValueExtractor extractor)

  Construct a ValueChangeEventFilter that evaluates MapEvent values based on the specified extractor.

  Parameters:
    `extractor` - ValueExtractor to extract MapEvent values

### ValueChangeEventFilter

    public ValueChangeEventFilter(java.lang.String sMethod)

  Construct a ValueChangeEventFilter that evaluates MapEvent values based on the specified method name.

  Parameters:
    `sMethod` - the name of the method to invoke via reflection

Method Detail

### evaluate

    public boolean evaluate(java.lang.Object o)

  Apply the test to the object.

  Specified by:
    `evaluate` in interface `Filter`
  Overrides:
    `evaluate` in class `ExtractorFilter`
  Parameters:
    `o` - the object to test
  Returns:
    true if the test passes, false otherwise

### evaluateExtracted

    protected boolean evaluateExtracted(java.lang.Object oExtracted)

  Evaluate the specified extracted value.

  Specified by:
    `evaluateExtracted` in class `ExtractorFilter`
  Parameters:
    `oExtracted` - an extracted value to evaluate

### equals

    public boolean equals(java.lang.Object o)

  Compare the ValueChangeEventFilter with another object to determine equality.

  Returns:
    true iff this ValueChangeEventFilter and the passed object are equivalent filters

### hashCode

    public int hashCode()

  Determine a hash value for the ValueChangeEventFilter object according to the general `Object.hashCode()` contract.

  Returns:
    an integer hash value for this ValueChangeEventFilter object

### toString

    public java.lang.String toString()

  Return a human-readable description for this Filter.

  Returns:
    a String description of the Filter

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.