com.waveset.expression
Class ExFunction.f_neq

java.lang.Object
  extended bycom.waveset.expression.ExNode
      extended bycom.waveset.expression.ExFunction.f_neq
All Implemented Interfaces:
com.sun.idm.debugger.common.Locatable
Enclosing class:
ExFunction

public static class ExFunction.f_neq
extends ExNode

The function node for the <neq> expression.

The neq expression tests for inequlity of its subexpression values. If the value of each subexpression is the same, the function returns the integer 0, if any subexpression value differ from another, the function returns 1.

If there is only one subexpression the function returns 0. If there are no subexpressions the function returns 1.

Returning 1 with no subexpressions sounds odd, but is done for symetry with the eq expression which returns 0 if there are no subexpressions. It is debatable which is correct, but the symetry should be maintained.

Equality is determined by the ExValue.compare() method.


Field Summary
 
Fields inherited from class com.waveset.expression.ExNode
_bindingCount, _children, _decoration, _parent, code_id, trace
 
Constructor Summary
ExFunction.f_neq()
           
 
Method Summary
protected  ExValue evalInternal(ExState state)
          Abstract evaluation method all nodes must have.
 java.lang.String getFunctionName()
          Nodes representing functions must have a name.
 
Methods inherited from class com.waveset.expression.ExNode
addChild, addChildren, addCommonAttributes, beginTrace, clearOwner, endTrace, eval, evalChild, evalChildToObject, evalChildToString, evalToBoolean, evalToInt, evalToObject, evalToString, getBindingCount, getChild, getChildren, getDecoration, getHiddenVariable, getLocation, getOwner, getParent, isLiteral, parseCommonAttributes, parseXml, postProcess, removeChild, resolveFunction, resolveVariable, setBindingCount, setChildren, setDecoration, setEnvironment, setLocation, setOwner, setOwner, setParent, toXml, toXml, toXml, toXmlAttributes, toXmlChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExFunction.f_neq

public ExFunction.f_neq()
Method Detail

getFunctionName

public java.lang.String getFunctionName()
Description copied from class: ExNode
Nodes representing functions must have a name. This name is used in the formatting of default trace messages and the default XML rendering. If a node doesn't have a name for some reason, or needs more control over the trace messges and XML, they must overload beginTrace, endTrace, and toXml below.

Specified by:
getFunctionName in class ExNode

evalInternal

protected ExValue evalInternal(ExState state)
                        throws WavesetException
Description copied from class: ExNode
Abstract evaluation method all nodes must have. Implementations of evalInternal need not (and should not) perform any tracing/breakpoints. This is all handled by the calling method eval.

Specified by:
evalInternal in class ExNode
Throws:
WavesetException