ContainsAnyFilter Class Reference

#include <coherence/util/filter/ContainsAnyFilter.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 any value in a Set.

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

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

Author:
djl 2008.04.07

Public Types

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

Protected Member Functions

 ContainsAnyFilter ()
 Default constructor (necessary for the PortableObject interface).
 ContainsAnyFilter (ValueExtractor::View vExtractor, Set::View vSetValues)
 Construct an ContainsAnyFilter for testing containment of any value in the given Set.
virtual bool evaluateExtracted (Object::View vExtracted) const
 Evaluate the specified extracted value.

Constructor & Destructor Documentation

ContainsAnyFilter ( ValueExtractor::View  vExtractor,
Set::View  vSetValues 
) [protected]

Construct an ContainsAnyFilter for testing containment of any value in the given Set.

Parameters:
vExtractor the ValueExtractor used by this filter
vSetValues the Set of values that a Collection or ObjectArray 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.