org.imemex.idm
Class AttributeExistsPredicate

java.lang.Object
  extended by org.imemex.predicates.AbstractPredicate
      extended by org.imemex.idm.AttributeExistsPredicate
All Implemented Interfaces:
Predicate

public class AttributeExistsPredicate
extends AbstractPredicate

Checks for the existance of an attribute in a tuple component.

Author:
jens

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.imemex.predicates.Predicate
Predicate.PredType
 
Constructor Summary
AttributeExistsPredicate(java.lang.String tuple, java.lang.String attributeName)
           
 
Method Summary
 Predicate copy()
          makes an exact copy of this predicate
<T> boolean
eval(java.util.Map<java.lang.String,T> variableBindings)
          Evaluates the predicate with the given map of pairs.
 
Methods inherited from class org.imemex.predicates.AbstractPredicate
equals, getType, getVariables, renameVariable, toString, toXML
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeExistsPredicate

public AttributeExistsPredicate(java.lang.String tuple,
                                java.lang.String attributeName)
Method Detail

copy

public Predicate copy()
Description copied from interface: Predicate
makes an exact copy of this predicate

Returns:

eval

public <T> boolean eval(java.util.Map<java.lang.String,T> variableBindings)
             throws UnboundVariableException
Description copied from interface: Predicate
Evaluates the predicate with the given map of pairs.

Parameters:
variableBindings - - a map that specifies the bindings for the predicate variables.
Returns:
true, if the predicate is true; false, otherwise.
Throws:
UnboundVariableException - - if some variable necessary to evaluate the predicate was not bound.