#include <coherence/util/ValueExtractor.hpp>
Inherits Object.
Inherited by AbstractExtractor [virtual], and NullImplementation::NullValueExtractor [virtual].
Important Note: all classes that implement the ValueExtractor interface must explicitly implement the Object::hashCode() and Object::equals methods in a way that is based solely on the object's serializable state.
Public Types | |
| typedef spec::Handle | Handle |
| ValueExtractor Handle definition. | |
| typedef spec::View | View |
| ValueExtractor View definition. | |
| typedef spec::Holder | Holder |
| ValueExtractor Holder definition. | |
Public Member Functions | |
| virtual Object::Holder | extract (Object::Holder ohTarget) const =0 |
| Extract the value from the passed object. | |
| virtual bool | equals (Object::View v) const =0 |
| Compare the ValueExtractor with another object to determine equality. | |
| virtual size32_t | hashCode () const =0 |
| Determine a hash value for the ValueExtractor object according to the general Object::hashCode() contract. | |
| virtual Object::Holder extract | ( | Object::Holder | ohTarget | ) | const [pure virtual] |
Extract the value from the passed object.
The returned value may be NULL.
| ohTarget | an Object to retrieve the value from |
| ClassCastException | if this ValueExtractor is incompatible with the passed object to extract a value from and the implementation requires the passed object to be of a certain type | |
| Exception | if this ValueExtractor encounters an exception in the course of extracting the value | |
| IllegalArgumentException | if this ValueExtractor cannot handle the passed object for any other reason; an implementor should include a descriptive message |
Implemented in AbstractExtractor, ChainedExtractor, ComparisonValueExtractor, IdentityExtractor, KeyExtractor, MultiExtractor, ReflectionExtractor, TypedExtractor, and TypedExtractor< RH::ValueType::BoxedType, C, M, coherence::lang::BoxHandle< RH::ValueType >, OH >.
| virtual bool equals | ( | Object::View | v | ) | const [pure virtual] |
Compare the ValueExtractor with another object to determine equality.
Two ValueExtractor objects, ve1 and ve2 are considered equal iff ve1->extract(v) equals ve2->extract(v) for all values of v.
| v | the reference object with which to compare |
Implemented in AbstractCompositeExtractor, IdentityExtractor, KeyExtractor, PofExtractor, ReflectionExtractor, TypedExtractor, and TypedExtractor< RH::ValueType::BoxedType, C, M, coherence::lang::BoxHandle< RH::ValueType >, OH >.
| virtual size32_t hashCode | ( | ) | const [pure virtual] |
Determine a hash value for the ValueExtractor object according to the general Object::hashCode() contract.
Reimplemented from Object.
Implemented in AbstractCompositeExtractor, IdentityExtractor, KeyExtractor, PofExtractor, ReflectionExtractor, TypedExtractor, and TypedExtractor< RH::ValueType::BoxedType, C, M, coherence::lang::BoxHandle< RH::ValueType >, OH >.