ehcache

net.sf.ehcache.search.expression
Class EqualTo

java.lang.Object
  extended by net.sf.ehcache.search.expression.BaseCriteria
      extended by net.sf.ehcache.search.expression.EqualTo
All Implemented Interfaces:
Criteria
Direct Known Subclasses:
NotEqualTo

public class EqualTo
extends BaseCriteria

A comparison operator meaning Java "equals to" condition

Author:
teck

Constructor Summary
EqualTo(String attributeName, Object value)
          Constructor
 
Method Summary
 boolean execute(Element e, Map<String,AttributeExtractor> attributeExtractors)
          Test this criteria against a cache element
 String getAttributeName()
          Get attribute name.
 AttributeType getType()
          Get attribute type.
 Object getValue()
          Get attribute value.
 
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

EqualTo

public EqualTo(String attributeName,
               Object value)
Constructor

Parameters:
attributeName - attribute name
value -
Method Detail

getValue

public Object getValue()
Get attribute value.

Returns:
attribute value

getAttributeName

public String getAttributeName()
Get attribute name.

Returns:
attribute name.

getType

public AttributeType getType()
Get attribute type.

Returns:
attribute type.

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

ehcache

Copyright 2001-2014, Terracotta, Inc.