EASE.Sensing.Specification
Class Conditional

java.lang.Object
  |
  +--EASE.Sensing.Specification.Cell
        |
        +--EASE.Sensing.Specification.Conditional

public class Conditional
extends Cell
implements Constants

Specification for all conditionals.

Don't know why I called it conditional ....

This class can be cleaned up a lot especially the way it handles operators.

See Also:
Serialized Form

Field Summary
static int AND
           
static int DIVIDED
           
private  Node engineNode
           
static int EQUAL
           
static int GREATER
           
static int HIGHEST_INDEX
           
private  int LEFT
           
static int LESS
           
static int MINUS
           
 int operator
           
static int OR
           
static int PLUS
           
static int POW
           
private  int RIGHT
           
(package private) static long serialVersionUID
           
static int TIMES
           
static java.util.Vector types
          A vector containing all the possible operator types
private static java.util.Hashtable typesHashed
           
static int XOR
           
 
Fields inherited from class EASE.Sensing.Specification.Cell
comment, creationDate, debugger, defaultFileName, fileName, instantiatedParams, listeners, name, previousVersion, serialVersionUID, subCells, subsequentVersion, treePath
 
Constructor Summary
Conditional(java.lang.String name, java.lang.String comment, Cell left, Cell right, int operator, Cell previous)
           
Conditional(java.lang.String name, java.lang.String comment, Cell left, Cell right, int operator, Cell previous, java.util.Vector instantiated)
           
 
Method Summary
 Node getEngineNode()
          This function gets the engine nodes of its children as creates an appropriate engine type.
protected  Cell getLeft()
           
protected  Cell getRight()
           
 int getType()
           
static java.util.Vector getTypes()
           
static ExpressionType opToExpType(int op)
          Returns an expression type object for the operator.
static java.lang.String opToStr(int i)
           
static int strToOp(java.lang.String s)
           
 
Methods inherited from class EASE.Sensing.Specification.Cell
addChangeListener, addSub, createChildDisplayTreeBranch, createParentDisplayTreeBranch, getComment, getFactory, getFileName, getFullName, getHistory, getInstantiatedParams, getListenerNames, getListType, getName, getParameters, getPrevious, getSub, getSubs, getSuccessor, getTreePath, hasListeners, hasParameters, instantiateParamsForEngine, instantiateParamsForEngine, justCreated, matchParam, notifyAllListeners, notifyChange, removeChangeListener, removeInstantiated, saveValidateSubs, saveValidateVector, setFileName, setInstantiatedParams, setSubs, setSuccessor, setTreePath, shortFileName, toString, validateSubs, validateVector
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

LEFT

private final int LEFT

RIGHT

private final int RIGHT

operator

public int operator

GREATER

public static final int GREATER

LESS

public static final int LESS

EQUAL

public static final int EQUAL

PLUS

public static final int PLUS

MINUS

public static final int MINUS

TIMES

public static final int TIMES

DIVIDED

public static final int DIVIDED

AND

public static final int AND

OR

public static final int OR

XOR

public static final int XOR

POW

public static final int POW

HIGHEST_INDEX

public static final int HIGHEST_INDEX

engineNode

private transient Node engineNode

types

public static java.util.Vector types
A vector containing all the possible operator types

typesHashed

private static java.util.Hashtable typesHashed

serialVersionUID

static final long serialVersionUID
Constructor Detail

Conditional

public Conditional(java.lang.String name,
                   java.lang.String comment,
                   Cell left,
                   Cell right,
                   int operator,
                   Cell previous)

Conditional

public Conditional(java.lang.String name,
                   java.lang.String comment,
                   Cell left,
                   Cell right,
                   int operator,
                   Cell previous,
                   java.util.Vector instantiated)
Method Detail

getType

public int getType()
Overrides:
getType in class Cell

opToStr

public static java.lang.String opToStr(int i)

strToOp

public static int strToOp(java.lang.String s)

getEngineNode

public Node getEngineNode()
This function gets the engine nodes of its children as creates an appropriate engine type.

Overrides:
getEngineNode in class Cell

getTypes

public static java.util.Vector getTypes()

opToExpType

public static ExpressionType opToExpType(int op)
Returns an expression type object for the operator.

Used for setting combos correctly.


getLeft

protected Cell getLeft()

getRight

protected Cell getRight()