|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--anvil.core.Any
|
+--anvil.core.AnyNegativeInfinity
class AnyNegativeInfinity
| Field Summary | |
static NativeClass |
_class
|
static Any |
INSTANCE
|
| 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 | |
ClassType |
classOf()
Returns the type of this Any. |
protected int |
compare(Any other)
|
boolean |
equals(java.lang.Object obj)
Tests for equality. |
int |
hashCode()
|
boolean |
isDouble()
Checks if this any is float. |
boolean |
isInt()
Checks if this any is int. |
Any |
minus()
Negate the sign. |
void |
serialize(Serializer serializer)
|
java.io.Writer |
toAnvil(java.io.Writer writer)
|
boolean |
toBoolean()
Gets the contained value as boolean. |
byte |
toByte()
|
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.String |
toString()
Converts contained value into String. |
int |
typeOf()
Returns the type of contained value. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final NativeClass _class
public static final Any INSTANCE
| Method Detail |
public ClassType classOf()
Any
classOf in class Anypublic int typeOf()
Any
typeOf in class Anypublic boolean isInt()
Anyint.
isInt in class Anytrue if this is intpublic boolean isDouble()
Anyfloat. In script the float is
used, but the implementation uses double.
isDouble in class Anytrue if this is floatpublic 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 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 byte toByte()
toByte in class Anypublic double toDouble()
Anydouble.
toDouble in class Anydouble or 0.0
if it can't be transformed.public Any minus()
Any
minus in class Anypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
Any
equals in class Anytrue if equal, false otherwise.protected int compare(Any other)
compare 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 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 | |||||||||