|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--anvil.core.Any
|
+--anvil.core.AnyNumber
|
+--anvil.core.AnyDouble
class AnyDouble
| Field Summary | |
static NativeClass |
_class
|
protected double |
_double
|
static java.lang.Object[] |
newInstance
|
| Fields inherited from class anvil.core.AnyNumber |
_long, p_format |
| Fields inherited from class anvil.core.Any |
ARRAY0, DOUBLE_MINUS_ONE, DOUBLE_ONE, DOUBLE_ZERO, EMPTY_STRING, EMPTY_TUPLE, FALSE, INF, IS_ARRAY, IS_BINARY, IS_BOOLEAN, IS_BUFFER, IS_CLASS, IS_DOUBLE, IS_ENUMERATION, IS_INF, IS_INT, IS_LIST, IS_MAP, IS_NEG_INF, IS_NULL, IS_PATTERN, IS_RANGE, IS_STRING, IS_TUPLE, IS_UNDEFINED, MINUS_ONE, NAN, NEG_INF, NULL, ONE, p_compareTo, p_each, p_equals, p_pipe, p_select, THREE, TRUE, TWO, UNDEFINED, ZERO |
| Constructor Summary | |
AnyDouble(double dbl)
|
|
AnyDouble(java.lang.Double dbl)
|
|
| Method Summary | |
Any |
add(Any other)
Adds two Any's together. |
ClassType |
classOf()
Returns the type of this Any. |
protected int |
compare(Any other)
|
Any |
decrease()
Decrease the value by one. |
Any |
divide(Any other)
Divide two Any's. |
boolean |
equals(java.lang.Object obj)
Tests for equality. |
int |
hashCode()
|
Any |
increase()
Increase the value by one. |
boolean |
isDouble()
Checks if this any is float. |
Any |
minus()
Negate the sign. |
Any |
modulo(Any other)
Calculate the remainder. |
Any |
multiply(Any other)
Multiply two Any's. |
static Any |
newInstance(Any value)
|
Any |
plus()
Remove the sign. |
void |
serialize(Serializer serializer)
|
Any |
subtract(Any other)
Substract two Any's. |
java.io.Writer |
toAnvil(java.io.Writer writer)
|
Any |
toAnyDouble()
Gets the contained value as AnyDouble. |
boolean |
toBoolean()
Gets the contained value as boolean. |
Code |
toCode(Code code)
|
double |
toDouble()
Gets the contained value as double. |
int |
toInt()
Gets the contained value as int. |
long |
toLong()
Gets the contained value as long. |
java.lang.Object |
toObject()
Gets the contained value as java.lang.Object. |
java.lang.String |
toString()
Converts contained value into String. |
int |
typeOf()
Returns the type of contained value. |
| Methods inherited from class anvil.core.AnyNumber |
m_format |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.Object[] newInstance
public static final transient NativeClass _class
protected double _double
| Constructor Detail |
public AnyDouble(double dbl)
public AnyDouble(java.lang.Double dbl)
| Method Detail |
public static final Any newInstance(Any value)
public int typeOf()
Any
typeOf in class Anypublic boolean isDouble()
Anyfloat. In script the float is
used, but the implementation uses double.
isDouble in class Anytrue if this is floatpublic boolean toBoolean()
Anyboolean.
Integer is considered true if it is different from 0.
Double is considered true if it is different from 0.0.
String is considered true if it contains
"true", "on",
"yes" or "1".
toBoolean in class Anypublic int toInt()
Anyint.
toInt in class Anyint or zero if it can't be transformed.public long toLong()
Anylong.
toLong in class Anylong or zero if it can't be transformed.public final ClassType classOf()
Any
classOf in class AnyNumberpublic double toDouble()
Anydouble.
toDouble in class Anydouble or 0.0
if it can't be transformed.public java.lang.String toString()
AnyString.
toString in class AnyString.
public java.io.Writer toAnvil(java.io.Writer writer)
throws java.io.IOException
toAnvil in class Anyjava.io.IOExceptionpublic Code toCode(Code code)
toCode in class Anypublic java.lang.Object toObject()
Anyjava.lang.Object.
toObject in class Anypublic Any toAnyDouble()
AnyAnyDouble.
toAnyDouble in class AnyAnyDouble.public int hashCode()
hashCode in class java.lang.Objectpublic Any increase()
Any
increase in class Anypublic Any decrease()
Any
decrease in class Anypublic Any minus()
Any
minus in class Anypublic Any plus()
Any
plus in class Anypublic Any add(Any other)
Any
add in class Anypublic Any subtract(Any other)
Any
subtract in class Anypublic Any multiply(Any other)
Anythis instance.
Will only work with integer and double.
multiply in class Anypublic Any divide(Any other)
Any
divide in class Anypublic Any modulo(Any other)
Any
modulo in class Anypublic boolean equals(java.lang.Object obj)
Any
equals in class Anytrue if equal, false otherwise.protected int compare(Any other)
compare in class Any
public void serialize(Serializer serializer)
throws java.io.IOException
serialize in class Anyjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||