ehcache

net.sf.ehcache.search.expression
Class And

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

public class And
extends BaseCriteria

A search criteria composed of the logical "and" of two or more other criteria

Author:
teck

Constructor Summary
And(Criteria lhs, Criteria rhs)
          Simple constructor for two criteria
 
Method Summary
 Criteria and(Criteria other)
          Produce a criteria that is the boolean "and" of this and the given other criteria
 boolean execute(Element e, Map<String,AttributeExtractor> attributeExtractors)
          Test this criteria against a cache element
 Set<Attribute<?>> getAttributes()
          Returns all search attributes referenced by this instance
 Criteria[] getCriterion()
          Return criterion
 
Methods inherited from class net.sf.ehcache.search.expression.BaseCriteria
getExtractor, not, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

And

public And(Criteria lhs,
           Criteria rhs)
Simple constructor for two criteria

Parameters:
lhs - the left hand side of the "and" expression
rhs - the right hand side of the "and" expression
Method Detail

and

public Criteria and(Criteria other)
Description copied from class: BaseCriteria
Produce a criteria that is the boolean "and" of this and the given other criteria

Specified by:
and in interface Criteria
Overrides:
and in class BaseCriteria
Returns:
and criteria

getCriterion

public Criteria[] getCriterion()
Return criterion

Returns:
criterion

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()
Returns all search attributes referenced by this instance

Specified by:
getAttributes in class BaseCriteria

ehcache

Copyright 2001-2015, Terracotta, Inc.