jfun.yan.xml.nuts.optional
Class BinaryPredicateNut

java.lang.Object
  extended by jfun.yan.xml.nut.Nut
      extended by jfun.yan.xml.nut.ComponentNut
          extended by jfun.yan.xml.nuts.optional.BinaryNut
              extended by jfun.yan.xml.nuts.optional.BinaryPredicateNut
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EqualsNut, NotEqualsNut, NotSameNut, SameNut

public abstract class BinaryPredicateNut
extends BinaryNut

Super class for any tag that compares two objects. The result is a Component that yields the boolean comparison result.

Author:
Ben Yu Nov 11, 2005 3:41:47 PM
See Also:
Serialized Form

Constructor Summary
BinaryPredicateNut()
           
 
Method Summary
 Component eval()
           
abstract  boolean predicate(java.lang.Object v1, java.lang.Object v2)
          The predicate.
 
Methods inherited from class jfun.yan.xml.nuts.optional.BinaryNut
getComponent1, getComponent2, getType1, getType2, getVal1, getVal2, isVal1Set, isVal2Set, set, setType1, setType2, setVal1, setVal2
 
Methods inherited from class jfun.yan.xml.nut.Nut
cast, checkDuplicate, checkMandatory, checkMandatory, convert, getComponentClassLoader, getId, getNutClassLoader, getNutEnvironment, getParameterWiring, getPropertyWiring, getSequenceNumber, getTagLocation, getTagName, initGloballyDefined, initNutEnvironment, initSequenceNumber, initTagLocation, initTagName, isGloballyDefined, raise, raise, register, registerEagerInstantiation, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryPredicateNut

public BinaryPredicateNut()
Method Detail

predicate

public abstract boolean predicate(java.lang.Object v1,
                                  java.lang.Object v2)
The predicate.

Parameters:
v1 - the first value.
v2 - the second value.

eval

public Component eval()
Specified by:
eval in class ComponentNut