|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.infinityloop.upcast.upl.val.UPLValue
de.infinityloop.upcast.upl.val.UPLNumeric
public class UPLNumeric
| Field Summary |
|---|
| Fields inherited from class de.infinityloop.upcast.upl.val.UPLValue |
|---|
isBreakValue, isEmptyReturnValue, isReturnValue, isValid, kTYPE_BOOL, kTYPE_COLOR, kTYPE_ID, kTYPE_LIST, kTYPE_NULL, kTYPE_NUMERIC, kTYPE_STRING, kTYPE_UNKNOWN, kTYPE_VALUE, kTYPE_VOID, type |
| Constructor Summary | |
|---|---|
UPLNumeric()
Constructs a new Numeric. |
|
UPLNumeric(double value)
Constructs a Numeric with power 0, i.e. it is simply a number. |
|
UPLNumeric(double value,
int pow)
Constructs a new Numeric. |
|
UPLNumeric(java.lang.String inText)
Constructs a new Numeric. |
|
| Method Summary | |
|---|---|
UPLValue |
add(UPLValue v)
|
UPLValue |
affirmate()
unary +. |
static UPLNumeric |
castToNumeric(UPLValue from)
|
int |
compareTo(int compareType,
UPLNumeric to)
|
int |
compareTo(int compareType,
UPLValue to)
|
UPLValue |
decrement()
unary decrement. |
UPLValue |
div(UPLValue v)
|
java.lang.String |
getAsString()
Returns a string representation of this Numeric. |
java.lang.String |
getAsUPL()
|
boolean |
getBooleanValue()
The boolean value of an UPLValue. |
java.lang.String |
getDebugString()
|
int |
getPow()
Returns the power of the Numeric. |
double |
getValue()
Returns the value of the Numeric. |
java.lang.String |
getValueAsString()
|
long |
getValueRounded()
|
UPLValue |
increment()
unary increment. |
UPLValue |
mod(UPLValue v)
|
UPLValue |
negate()
Calculates the negative of this Numeric. |
void |
setPow(int i)
Sets the power of the Numeric. |
void |
setValue(double d)
Sets the value of the Numeric. |
void |
setValue(java.lang.String d)
Sets the value of the Numeric. |
UPLValue |
sub(UPLValue v)
|
UPLValue |
times(UPLValue v)
|
| Methods inherited from class de.infinityloop.upcast.upl.val.UPLValue |
|---|
castValueToType, equals, eval, getType, getType, getTypeName, getTypeName, isBreakValue, isEmptyReturnValue, isReturnValue, isValid, not, setBreakValue, setEmptyReturnValue, setReturnValue, setValid, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UPLNumeric()
public UPLNumeric(double value)
value -
public UPLNumeric(double value,
int pow)
value - the value of the Numericpow - the power of the Numericpublic UPLNumeric(java.lang.String inText)
inText - the text based on which the value for this Numeric is set| Method Detail |
|---|
public static UPLNumeric castToNumeric(UPLValue from)
throws UPLValueException
UPLValueException
public UPLValue add(UPLValue v)
throws UPLValueException
add in class UPLValueUPLValueException
public UPLValue sub(UPLValue v)
throws UPLValueException
sub in class UPLValueUPLValueException
public UPLValue times(UPLValue v)
throws UPLValueException
times in class UPLValueUPLValueException
public UPLValue div(UPLValue v)
throws UPLValueException
div in class UPLValueUPLValueException
public UPLValue mod(UPLValue v)
throws UPLValueException
mod in class UPLValueUPLValueException
public int compareTo(int compareType,
UPLValue to)
throws UPLValueException
compareTo in class UPLValueUPLValueException
public int compareTo(int compareType,
UPLNumeric to)
throws UPLValueException
UPLValueExceptionpublic boolean getBooleanValue()
UPLValue
getBooleanValue in class UPLValueUPLValue.getBooleanValue()
public UPLValue affirmate()
throws UPLValueException
affirmate in class UPLValueUPLValueExceptionUPLValue.affirmate()public UPLValue negate()
negate in class UPLValuepublic UPLValue increment()
UPLValue
increment in class UPLValuepublic UPLValue decrement()
UPLValue
decrement in class UPLValuepublic int getPow()
public double getValue()
public long getValueRounded()
public java.lang.String getValueAsString()
public void setPow(int i)
i - the power of the Numericpublic void setValue(double d)
d - the value of the Numeric
public void setValue(java.lang.String d)
throws UPLValueException
d - the value of the Numeric
UPLValueExceptionpublic java.lang.String getAsString()
getAsString in class UPLValuepublic java.lang.String getAsUPL()
getAsUPL in class UPLValuepublic java.lang.String getDebugString()
getDebugString in class UPLValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||