com.endeca.portal.attributes.filter
Class ExclusiveSetFilter

java.lang.Object
  extended by com.endeca.portal.attributes.filter.ExclusiveSetFilter
All Implemented Interfaces:
BPCFilter

public class ExclusiveSetFilter
extends java.lang.Object
implements BPCFilter

This filter tests whether the key property of a given BasePropertyContainer object belongs to a predefined set of keys. If the BPC key is found in the set, the filter returns true, otherwise, if the BPC key is not found or the keySet is null, the filter returns false.

Author:
Endeca Technologies, Inc

Constructor Summary
ExclusiveSetFilter()
           
 
Method Summary
 void addKey(java.lang.String key)
           
 java.util.Set<java.lang.String> getKeySet()
           
 void setKeySet(java.util.Set<java.lang.String> keySet)
           
 boolean test(BasePropertyContainer bpc)
          The filter test method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExclusiveSetFilter

public ExclusiveSetFilter()
Method Detail

addKey

public void addKey(java.lang.String key)

setKeySet

public void setKeySet(java.util.Set<java.lang.String> keySet)
Parameters:
keySet - the keySet to set

getKeySet

public java.util.Set<java.lang.String> getKeySet()
Returns:
the keySet

test

public boolean test(BasePropertyContainer bpc)
Description copied from interface: BPCFilter
The filter test method.

Specified by:
test in interface BPCFilter
Parameters:
bpc - - an instance of a BasePropertyContainer object, such as an Attribute or a Group that should be tested against this filter
Returns:
true if the BPC should be included, false if the BPC should be filtered out.