public class GInteger extends ExecutionResult<java.lang.Integer> implements ToFloat, ToInteger, ToBoolean, TextHolder
QUIT, UNDEF, VOID
Constructor and Description |
---|
GInteger() |
GInteger(java.lang.Integer value) |
Modifier and Type | Method and Description |
---|---|
boolean |
asBoolean()
Casts the value to boolean.
|
float |
asFloat()
Casts the value to float.
|
int |
asInteger()
Casts the value to int.
|
GInteger |
clone() |
java.lang.String |
getText()
Returns the text.
|
ScriptType |
getType()
Returns the type of the result.
|
static ScriptType |
getTypeStatic() |
java.lang.Integer |
getValue()
Returns the internal value.
|
boolean |
isZero()
Indicates whether or not the value is zero, regardless, of which type this zero is.
|
void |
setValue(java.lang.Integer value)
Sets the internal value.
|
equals, getSign, getStringRepresentation, getTypeName, toString
getScriptConstantRepresentation, isStopExecution
public java.lang.Integer getValue()
ExecutionResult
getValue
in class ExecutionResult<java.lang.Integer>
public void setValue(java.lang.Integer value)
ExecutionResult
setValue
in class ExecutionResult<java.lang.Integer>
value
- the new value.public ScriptType getType()
ExecutionResult
getType
in class ExecutionResult<java.lang.Integer>
public boolean isZero()
ExecutionResult
isZero
in class ExecutionResult<java.lang.Integer>
public static ScriptType getTypeStatic()
public int asInteger()
ToInteger
public float asFloat()
ToFloat
public boolean asBoolean()
ToBoolean
public GInteger clone()
clone
in class ExecutionResult<java.lang.Integer>
public java.lang.String getText()
TextHolder
getText
in interface TextHolder