ContainsFilter Class Reference

#include <coherence/util/filter/ContainsFilter.hpp>

Inherits ComparisonFilter.

List of all members.


Detailed Description

Filter which tests a Collection or Object array value returned from a method invocation for containment of a given value.

More formally, if the specified extractor returns a Collection, evaluate(o) is functionally equivalent to the following code:

 return ((Collection) extract(o))->contains(getValue());
 
If the specified method returns an Object array, evaluate(o) is functionally equivalent to the following code:
 return Collections->asList((ObjectArray::View) extract(o))->contains(
           getValue());
 

Author:
djl 2008.04.07

Public Types

typedef spec::Handle Handle
 ContainsFilter Handle definition.
typedef spec::View View
 ContainsFilter View definition.
typedef spec::Holder Holder
 ContainsFilter Holder definition.

Protected Member Functions

 ContainsFilter ()
 Default constructor (necessary for the PortableObject interface).
 ContainsFilter (ValueExtractor::View vExtractor, Object::View vValue)
 Construct an ContainsFilter for testing containment of the given object.
virtual bool evaluateExtracted (Object::View vExtracted) const
 Evaluate the specified extracted value.

Constructor & Destructor Documentation

ContainsFilter ( ValueExtractor::View  vExtractor,
Object::View  vValue 
) [protected]

Construct an ContainsFilter for testing containment of the given object.

Parameters:
vExtractor the ValueExtractor used by this filter
vValue the object that a Collection or Object array is tested to contain


Member Function Documentation

virtual bool evaluateExtracted ( Object::View  vExtracted  )  const [protected, virtual]

Evaluate the specified extracted value.

Parameters:
vExtracted an extracted value to evaluate

Implements ExtractorFilter.


The documentation for this class was generated from the following file: Copyright (c) 2000-2008 Oracle. All rights reserved.