org.imemex.predicates
Class NotEquals

java.lang.Object
  extended by org.imemex.predicates.AbstractPredicate
      extended by org.imemex.predicates.NotEquals
All Implemented Interfaces:
ComparisonPredicate, Predicate

public class NotEquals
extends AbstractPredicate
implements ComparisonPredicate

Author:
ogirard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.imemex.predicates.Predicate
Predicate.PredType
 
Constructor Summary
NotEquals(java.lang.String variable1, java.lang.String variable2)
           
 
Method Summary
 Predicate copy()
          makes an exact copy of this predicate
<T> boolean
eval(java.util.Map<java.lang.String,T> variableBindings)
          Contract: works only for two variables.
static BindPredicate newNotEquals(java.lang.String name, java.lang.Object object)
           
 
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

NotEquals

public NotEquals(java.lang.String variable1,
                 java.lang.String variable2)
Method Detail

copy

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

Specified by:
copy in interface Predicate
Returns:

eval

public <T> boolean eval(java.util.Map<java.lang.String,T> variableBindings)
             throws UnboundVariableException
Contract: works only for two variables. Expressions having more variables have to be decomposed into multiple predicates.

Specified by:
eval in interface Predicate
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.

newNotEquals

public static BindPredicate newNotEquals(java.lang.String name,
                                         java.lang.Object object)