public class IntegerValue extends Value
ExpressionEval
Constructor and Description |
---|
IntegerValue(ValueType type,
java.lang.Integer value)
The constructor
|
Modifier and Type | Method and Description |
---|---|
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() |
public IntegerValue(ValueType type, java.lang.Integer value)
type
- The typevalue
- the valuepublic int intValue()
public Value addition(Value value) throws ExpressionParserException
addition
in class Value
value
- The value to add this value toExpressionParserException
- Thrown if their is a problem performing the operation.public Value divide(Value value) throws ExpressionParserException
divide
in class Value
value
- The value to divide this value byExpressionParserException
- Thrown if their is a problem performing the operation.public Value multiply(Value value) throws ExpressionParserException
multiply
in class Value
value
- The value to multiply this value byExpressionParserException
- Thrown if their is a problem performing the operation.public Value subtract(Value value) throws ExpressionParserException
subtract
in class Value
value
- The value to subtractExpressionParserException
- Thrown if not supported by this valuepublic java.lang.String toString()
toString
in class java.lang.Object
public Value notequals(Value value)
!=
operation between this value and the value in the
parameterpublic Value equals(Value value)
==
operation between this value and the value in the
parameterpublic Value greater(Value value)
>
operation between this value and the value in the
parameterpublic Value greaterEquals(Value value)
>=
operation between this value and the value in the
parametergreaterEquals
in class Value
value
- The value to perform the operation withpublic Value less(Value value)
<
operation between this value and the value in the
parameterpublic Value lessEquals(Value value)
<=
operation between this value and the value in the
parameterlessEquals
in class Value
value
- The value to perform the operation with