ehcache

net.sf.ehcache.search.expression
Class InCollection

java.lang.Object
  extended by net.sf.ehcache.search.expression.BaseCriteria
      extended by net.sf.ehcache.search.expression.InCollection
All Implemented Interfaces:
Criteria

public class InCollection
extends BaseCriteria

Criteria for inclusion in a given Collection (presumably a Set) of values

Author:
teck

Constructor Summary
InCollection(String attributeName, Collection<?> values)
          Constructor
 
Method Summary
 boolean execute(Element e, Map<String,AttributeExtractor> attributeExtractors)
          Test this criteria against a cache element
 String getAttributeName()
          Return attributeName
 Set<Attribute<?>> getAttributes()
          Returns all search attributes referenced by this instance
 Collection<?> values()
          Return values.
 
Methods inherited from class net.sf.ehcache.search.expression.BaseCriteria
and, getExtractor, not, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InCollection

public InCollection(String attributeName,
                    Collection<?> values)
Constructor

Parameters:
attributeName - attribute name
values -
Method Detail

getAttributeName

public String getAttributeName()
Return attributeName

Returns:
String attribute name

values

public Collection<?> values()
Return values.

Returns:
Collection values

execute

public boolean execute(Element e,
                       Map<String,AttributeExtractor> attributeExtractors)
Test this criteria against a cache element

Parameters:
e - cache element
attributeExtractors - map of attribute extractors to attribute value names
Returns:
true if the criteria matches this element

getAttributes

public Set<Attribute<?>> getAttributes()
Description copied from class: BaseCriteria
Returns all search attributes referenced by this instance

Specified by:
getAttributes in class BaseCriteria

ehcache

Copyright 2001-2014, Terracotta, Inc.