org.stanwood.media.source.xbmc.expression
Class IntegerValue

java.lang.Object
  extended by org.stanwood.media.source.xbmc.expression.Value
      extended by org.stanwood.media.source.xbmc.expression.IntegerValue

public class IntegerValue
extends Value

Used to store integer values for the ExpressionEval


Constructor Summary
IntegerValue(ValueType type, java.lang.Integer value)
          The constructor
 
Method Summary
 Value addition(Value value)
          Used to add this value to another value
 Value divide(Value value)
          Used to divide this value with another value
 Value equals(Value value)
          Used to perform a == operation between this value and the value in the parameter
 Value greater(Value value)
          Used to perform a > operation between this value and the value in the parameter
 Value greaterEquals(Value value)
          Used to perform a >= operation between this value and the value in the parameter
 int intValue()
          Get the value as a int
 Value less(Value value)
          Used to perform a < operation between this value and the value in the parameter
 Value lessEquals(Value value)
          Used to perform a <= operation between this value and the value in the parameter
 Value multiply(Value value)
          Used to multiply this value with another value
 Value notequals(Value value)
          Used to perform a != operation between this value and the value in the parameter
 Value subtract(Value value)
          Used to subtract the parameter value from this value
 java.lang.String toString()
          
 
Methods inherited from class org.stanwood.media.source.xbmc.expression.Value
and, getType, getValue, not, or, setType, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntegerValue

public IntegerValue(ValueType type,
                    java.lang.Integer value)
The constructor

Parameters:
type - The type
value - the value
Method Detail

intValue

public int intValue()
Get the value as a int

Returns:
The value as a int

addition

public Value addition(Value value)
               throws ExpressionParserException
Used to add this value to another value

Overrides:
addition in class Value
Parameters:
value - The value to add this value to
Returns:
The added values
Throws:
ExpressionParserException - Thrown if their is a problem performing the operation.

divide

public Value divide(Value value)
             throws ExpressionParserException
Used to divide this value with another value

Overrides:
divide in class Value
Parameters:
value - The value to divide this value by
Returns:
The result of the operation
Throws:
ExpressionParserException - Thrown if their is a problem performing the operation.

multiply

public Value multiply(Value value)
               throws ExpressionParserException
Used to multiply this value with another value

Overrides:
multiply in class Value
Parameters:
value - The value to multiply this value by
Returns:
The result of the operation
Throws:
ExpressionParserException - Thrown if their is a problem performing the operation.

subtract

public Value subtract(Value value)
               throws ExpressionParserException
Used to subtract the parameter value from this value

Overrides:
subtract in class Value
Parameters:
value - The value to subtract
Returns:
The result of the operation
Throws:
ExpressionParserException - Thrown if not supported by this value

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

notequals

public Value notequals(Value value)
Used to perform a != operation between this value and the value in the parameter

Overrides:
notequals in class Value
Parameters:
value - The value to perform the operation with
Returns:
The result

equals

public Value equals(Value value)
Used to perform a == operation between this value and the value in the parameter

Overrides:
equals in class Value
Parameters:
value - The value to perform the operation with
Returns:
The result

greater

public Value greater(Value value)
Used to perform a > operation between this value and the value in the parameter

Overrides:
greater in class Value
Parameters:
value - The value to perform the operation with
Returns:
The result

greaterEquals

public Value greaterEquals(Value value)
Used to perform a >= operation between this value and the value in the parameter

Overrides:
greaterEquals in class Value
Parameters:
value - The value to perform the operation with
Returns:
The result

less

public Value less(Value value)
Used to perform a < operation between this value and the value in the parameter

Overrides:
less in class Value
Parameters:
value - The value to perform the operation with
Returns:
The result

lessEquals

public Value lessEquals(Value value)
Used to perform a <= operation between this value and the value in the parameter

Overrides:
lessEquals in class Value
Parameters:
value - The value to perform the operation with
Returns:
The result