|
||||||||||
| 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.AnyInt
class AnyInt.
| Field Summary | |
static NativeClass |
_class
|
protected long |
_long
|
static java.lang.Object[] |
newInstance
|
| Fields inherited from class anvil.core.AnyNumber |
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 |
| Method Summary | |
Any |
add(Any other)
Adds two Any's together. |
ClassType |
classOf()
Returns the type of this Any. |
java.lang.Object |
clone()
Returns shallow copy from 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 |
isInt()
Checks if this any is int. |
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 |
toAnyInt()
Gets the contained value as AnyInt. |
boolean |
toBoolean()
Gets the contained value as boolean. |
char |
toChar()
Gets the contained value as char. |
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 long _long
| Method Detail |
public static final Any newInstance(Any value)
public java.lang.Object clone()
Any
clone in class Anypublic int typeOf()
Any
typeOf in class Anypublic boolean isInt()
Anyint.
isInt in class Anytrue if this is intpublic final ClassType classOf()
Any
classOf in class AnyNumberpublic 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 double toDouble()
Anydouble.
toDouble in class Anydouble or 0.0
if it can't be transformed.public char toChar()
Anychar. Value is converted to
string and first character is returned.
toChar in class Anypublic 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 toAnyInt()
AnyAnyInt.
toAnyInt in class AnyAnyInt.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 | |||||||||