org.foray.fotree.value
Class Expr

java.lang.Object
  extended by org.foray.fotree.value.Expr
All Implemented Interfaces:
PropertyValue
Direct Known Subclasses:
ExprAdditive

public abstract class Expr
extends Object
implements PropertyValue

Abstract Base Class for all Expressions.


Field Summary
static byte OPERATION_ADD
          Constant indicating an add operation.
static byte OPERATION_DIVIDE
          Constant indicating a division operation.
static byte OPERATION_MOD
          Constant indicating a modulo or remainder operation.
static byte OPERATION_MULTIPLY
          Constant indicating a multiplication operation.
static byte OPERATION_NEGATION
          Constant indicating a negation operation.
static byte OPERATION_SUBTRACT
          Constant indicating a subtract operation.
static byte UNIT_POWER_AREA
          Constant indicating a two-dimensional item in space, that is, an area.
static byte UNIT_POWER_LENGTH
          Constant indicating a one-dimensional item in space, that is, a length.
static byte UNIT_POWER_NON_NUMERIC
          Constant indicating an invalid unit power, that is, a non-numeric item.
static byte UNIT_POWER_NUMERIC
          Constant indicating a numeric item, but one that has zero dimensions.
 
Constructor Summary
Expr()
           
 
Method Summary
 IllegalStateException evalColorException()
          Standard exception when trying to evaluate to a Color for a value that cannot do so.
 IllegalStateException evalIntegerException()
          Standard exception when trying to evaluate to an Integer for a value that cannot do so.
 IllegalStateException evalKeywordException()
          Standard exception when trying to evaluate to a Keyword for a value that cannot do so.
 IllegalStateException evalLengthException()
          Standard exception when trying to evaluate to a Length for a value that cannot do so.
 IllegalStateException evalNumericException()
          Standard exception when trying to evaluate to a Numeric for a value that cannot do so.
 IllegalStateException evalPercentageException()
          Standard exception when trying to evaluate to a Percentage for a value that cannot do so.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.foray.fotree.value.PropertyValue
canEvalColor, canEvalInteger, canEvalKeyword, canEvalLength, canEvalNumeric, canEvalPercentage, evalColor, evalInteger, evalKeyword, evalLength, evalNumeric, evalPercentage, getUnitPower, lengthRequiresFontSize
 

Field Detail

UNIT_POWER_NON_NUMERIC

public static final byte UNIT_POWER_NON_NUMERIC
Constant indicating an invalid unit power, that is, a non-numeric item.

See Also:
Constant Field Values

UNIT_POWER_NUMERIC

public static final byte UNIT_POWER_NUMERIC
Constant indicating a numeric item, but one that has zero dimensions.

See Also:
Constant Field Values

UNIT_POWER_LENGTH

public static final byte UNIT_POWER_LENGTH
Constant indicating a one-dimensional item in space, that is, a length.

See Also:
Constant Field Values

UNIT_POWER_AREA

public static final byte UNIT_POWER_AREA
Constant indicating a two-dimensional item in space, that is, an area.

See Also:
Constant Field Values

OPERATION_ADD

public static final byte OPERATION_ADD
Constant indicating an add operation.

See Also:
Constant Field Values

OPERATION_SUBTRACT

public static final byte OPERATION_SUBTRACT
Constant indicating a subtract operation.

See Also:
Constant Field Values

OPERATION_MULTIPLY

public static final byte OPERATION_MULTIPLY
Constant indicating a multiplication operation.

See Also:
Constant Field Values

OPERATION_DIVIDE

public static final byte OPERATION_DIVIDE
Constant indicating a division operation.

See Also:
Constant Field Values

OPERATION_MOD

public static final byte OPERATION_MOD
Constant indicating a modulo or remainder operation.

See Also:
Constant Field Values

OPERATION_NEGATION

public static final byte OPERATION_NEGATION
Constant indicating a negation operation.

See Also:
Constant Field Values
Constructor Detail

Expr

public Expr()
Method Detail

evalNumericException

public IllegalStateException evalNumericException()
Standard exception when trying to evaluate to a Numeric for a value that cannot do so.

Returns:
An appropriate Exception.

evalColorException

public IllegalStateException evalColorException()
Standard exception when trying to evaluate to a Color for a value that cannot do so.

Returns:
An appropriate Exception.

evalLengthException

public IllegalStateException evalLengthException()
Standard exception when trying to evaluate to a Length for a value that cannot do so.

Returns:
An appropriate Exception.

evalIntegerException

public IllegalStateException evalIntegerException()
Standard exception when trying to evaluate to an Integer for a value that cannot do so.

Returns:
An appropriate Exception.

evalKeywordException

public IllegalStateException evalKeywordException()
Standard exception when trying to evaluate to a Keyword for a value that cannot do so.

Returns:
An appropriate Exception.

evalPercentageException

public IllegalStateException evalPercentageException()
Standard exception when trying to evaluate to a Percentage for a value that cannot do so.

Returns:
An appropriate Exception.


Copyright © 2017. All rights reserved.