|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--anvil.core.Any
class Any
| Field Summary | |
static NativeClass |
_class
|
static Any[] |
ARRAY0
|
static Any |
DOUBLE_MINUS_ONE
|
static Any |
DOUBLE_ONE
|
static Any |
DOUBLE_ZERO
|
static Any |
EMPTY_STRING
|
static AnyTuple |
EMPTY_TUPLE
|
static Any |
FALSE
|
static Any |
INF
|
static int |
IS_ARRAY
|
static int |
IS_BINARY
|
static int |
IS_BOOLEAN
|
static int |
IS_BUFFER
|
static int |
IS_CLASS
|
static int |
IS_DOUBLE
|
static int |
IS_ENUMERATION
|
static int |
IS_INF
|
static int |
IS_INT
|
static int |
IS_LIST
|
static int |
IS_MAP
|
static int |
IS_NEG_INF
|
static int |
IS_NULL
|
static int |
IS_PATTERN
|
static int |
IS_RANGE
|
static int |
IS_STRING
|
static int |
IS_TUPLE
|
static int |
IS_UNDEFINED
|
static Any |
MINUS_ONE
|
static Any |
NAN
|
static Any |
NEG_INF
|
static Any |
NULL
|
static Any |
ONE
|
static java.lang.Object[] |
p_compareTo
|
static java.lang.Object[] |
p_each
|
static java.lang.Object[] |
p_equals
|
static java.lang.Object[] |
p_pipe
|
static java.lang.Object[] |
p_select
|
static Any |
THREE
|
static Any |
TRUE
|
static Any |
TWO
|
static Any |
UNDEFINED
|
static Any |
ZERO
|
| Constructor Summary | |
protected |
Any()
Constructs Any containing IS_NULL. |
| Method Summary | |
protected void |
_clone(Any source)
|
protected void |
_copy(Any source)
|
Any |
_invoke(Context context,
int methodIndex)
|
Any |
_invoke(Context context,
int methodIndex,
Any param1)
|
Any |
_invoke(Context context,
int methodIndex,
Any[] parameters)
|
Any |
_invoke(Context context,
int methodIndex,
Any param1,
Any param2)
|
Any |
_invoke(Context context,
int methodIndex,
Any param1,
Any param2,
Any param3)
|
Any |
_invoke(Context context,
int methodIndex,
Any param1,
Any param2,
Any param3,
Any param4)
|
protected void |
_serialize(Serializer serializer)
|
protected void |
_unserialize(Unserializer unserializer)
|
protected void |
_wakeup(Context context)
|
Any |
add(Any other)
Adds two Any's together. |
java.lang.String |
classNameOf()
Returns the classname of contained object |
ClassType |
classOf()
Returns the type of this Any. |
java.lang.Object |
clone()
Returns shallow copy from this any. |
Any |
coerce()
|
protected int |
compare(Any other)
|
int |
compareTo(java.lang.Object obj)
Compares two Any's. |
Any |
concat(Any any)
Concatenated two Any's together. |
boolean |
contains(Any value)
|
Any |
copy()
Returns deep copy from this any. |
static Any |
create()
Constructs Any containing IS_NULL. |
static Any |
create(Any any)
Constructs Any from another Any instance |
static Any |
create(boolean bool)
Constructs Any containing IS_BOOLEAN |
static Any |
create(java.lang.Boolean bool)
Constructs Any containing IS_BOOLEAN |
static Any |
create(char ch)
Constructs Any containing IS_STRING
with length == 1 and charAt(0) == ch. |
static Any |
create(double dbl)
Constructs Any containing IS_DOUBLE |
static Any |
create(java.lang.Double dbl)
Constructs Any containing IS_DOUBLE |
static Any |
create(int integer)
Constructs Any containing IS_INT |
static Any |
create(java.lang.Integer integer)
Constructs Any containing IS_INT |
static Any |
create(int type,
java.lang.String value)
Constructs Any with spefified type and value |
static Any |
create(long lng)
Constructs Any containing IS_INT |
static Any |
create(java.lang.Object object)
|
static Any |
create(java.lang.String string)
Constructs Any containing IS_STRING |
static Any |
create(java.lang.String[] array)
|
Any |
decrease()
Decrease the value by one. |
boolean |
deleteAttribute(Context context,
java.lang.String attribute)
|
boolean |
deleteReference(Context context,
Any index)
|
Any |
divide(Any b)
Divide two Any's. |
boolean |
equals(java.lang.Object obj)
Tests for equality. |
Any |
execute(Context context)
|
Any |
execute(Context context,
Any param1)
|
Any |
execute(Context context,
Any[] parameters)
|
Any |
execute(Context context,
Any param1,
Any param2)
|
Any |
execute(Context context,
Any param1,
Any param2,
Any param3)
|
Any |
execute(Context context,
Any param1,
Any param2,
Any param3,
Any param4)
|
Any |
getAttribute(Context context,
java.lang.String attribute)
|
Any |
getRef()
|
Any |
getReference(Context context,
Any index)
|
boolean |
has(java.lang.String methodName)
|
Any |
increase()
Increase the value by one. |
Any |
invoke(Context context,
int methodIndex)
|
Any |
invoke(Context context,
int methodIndex,
Any param1)
|
Any |
invoke(Context context,
int methodIndex,
Any[] parameters)
|
Any |
invoke(Context context,
int methodIndex,
Any param1,
Any param2)
|
Any |
invoke(Context context,
int methodIndex,
Any param1,
Any param2,
Any param3)
|
Any |
invoke(Context context,
int methodIndex,
Any param1,
Any param2,
Any param3,
Any param4)
|
Any |
invoke(Context context,
java.lang.String methodName)
|
Any |
invoke(Context context,
java.lang.String methodName,
Any param1)
|
Any |
invoke(Context context,
java.lang.String methodName,
Any[] parameters)
|
Any |
invoke(Context context,
java.lang.String methodName,
Any param1,
Any param2)
|
Any |
invoke(Context context,
java.lang.String methodName,
Any param1,
Any param2,
Any param3)
|
Any |
invoke(Context context,
java.lang.String methodName,
Any param1,
Any param2,
Any param3,
Any param4)
|
boolean |
isArray()
Checks if this any is array. |
boolean |
isBinary()
Checks if this any is binary. |
boolean |
isBoolean()
Checks if this any is boolean. |
boolean |
isBuffer()
Checks if this any is buffer. |
boolean |
isDefined()
Checks if this any is defined. |
boolean |
isDouble()
Checks if this any is float. |
boolean |
isInstanceOf(Type ofType)
Checks if this any is of given type. |
boolean |
isInt()
Checks if this any is int. |
boolean |
isIterator()
Checks if this any is iterator. |
boolean |
isList()
Checks if this any is list. |
boolean |
isMap()
Checks if this any is map. |
boolean |
isMutable()
|
boolean |
isNull()
Checks if this any is null. |
boolean |
isPattern()
Checks if this any is pattern. |
boolean |
isRange()
Checks if this any is range. |
boolean |
isRef()
|
boolean |
isSequence()
|
boolean |
isString()
Checks if this any is string. |
boolean |
isTuple()
Checks if this any is tuple. |
boolean |
isUndefined()
Checks if this any is undefined. |
BindingIterator |
iterator()
|
Any |
m_clone()
|
Any |
m_compareTo(Any other)
|
Any |
m_copy()
Exposed methods |
Any |
m_each(Context context,
Any callback)
|
Any |
m_equals(Any other)
|
Any |
m_hashCode()
|
Any |
m_pipe(Context context,
Any converter)
|
Any |
m_select(Context context,
Any selector)
|
Any |
m_toBoolean()
|
Any |
m_toString()
|
Any |
minus()
Negate the sign. |
Any |
modulo(Any b)
Calculate the remainder. |
Any |
multiply(Any b)
Multiply two Any's. |
Any |
not()
|
Any |
plus()
Remove the sign. |
void |
serialize(Serializer serializer)
|
Any |
setAttribute(Context context,
java.lang.String attribute,
Any value)
|
Any |
setRef(Any value)
|
Any |
setReference(Context context,
Any value)
|
Any |
setReference(Context context,
Any index,
Any value)
|
int |
sizeOf()
Returns the logical size of this any. |
Any |
subtract(Any b)
Substract two Any's. |
java.lang.String |
toAnvil()
Converts contained value into value anvil code. |
java.io.Writer |
toAnvil(java.io.Writer writer)
|
Any |
toAnyBoolean()
Gets the contained value as AnyTrue or AnyFalse |
Any |
toAnyDouble()
Gets the contained value as AnyDouble. |
Any |
toAnyInt()
Gets the contained value as AnyInt. |
Any |
toAnyString()
Converts contained value into AnyString. |
Array |
toArray()
Gets the contained vaelue as Array. |
byte[] |
toBinary()
Gets the contained value as byte[]. |
boolean |
toBoolean()
Gets the contained value as boolean. |
java.lang.StringBuffer |
toBuffer()
|
byte |
toByte()
|
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. |
Any[] |
toList()
|
long |
toLong()
Gets the contained value as long. |
AnyMap |
toMap()
|
java.lang.Object |
toObject()
Gets the contained value as java.lang.Object. |
java.util.regex.Pattern |
toPattern()
|
AnyRange |
toRange()
|
java.lang.String |
toString()
Converts contained value into String. |
Any[] |
toTuple()
Gets the contained value as Any[]. |
Type |
type()
|
int |
typeOf()
Returns the type of contained value. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final transient Any NULL
public static final transient Any UNDEFINED
public static final transient Any FALSE
public static final transient Any TRUE
public static final transient Any ZERO
public static final transient Any ONE
public static final transient Any TWO
public static final transient Any THREE
public static final transient Any MINUS_ONE
public static final transient Any DOUBLE_ZERO
public static final transient Any DOUBLE_ONE
public static final transient Any DOUBLE_MINUS_ONE
public static final transient Any INF
public static final transient Any NEG_INF
public static final transient Any NAN
public static final transient Any EMPTY_STRING
public static final transient Any[] ARRAY0
public static final transient AnyTuple EMPTY_TUPLE
public static final transient int IS_NEG_INF
public static final transient int IS_UNDEFINED
public static final transient int IS_NULL
public static final transient int IS_BOOLEAN
public static final transient int IS_INT
public static final transient int IS_DOUBLE
public static final transient int IS_STRING
public static final transient int IS_BUFFER
public static final transient int IS_BINARY
public static final transient int IS_PATTERN
public static final transient int IS_MAP
public static final transient int IS_RANGE
public static final transient int IS_ENUMERATION
public static final transient int IS_TUPLE
public static final transient int IS_LIST
public static final transient int IS_ARRAY
public static final transient int IS_CLASS
public static final transient int IS_INF
public static final java.lang.Object[] p_equals
public static final java.lang.Object[] p_compareTo
public static final java.lang.Object[] p_each
public static final java.lang.Object[] p_pipe
public static final java.lang.Object[] p_select
public static final NativeClass _class
| Constructor Detail |
protected Any()
IS_NULL.
| Method Detail |
public static Any create()
IS_NULL.
public static Any create(char ch)
IS_STRING
with length == 1 and charAt(0) == ch.
public static Any create(java.lang.String string)
IS_STRING
string - String valuepublic static Any create(java.lang.String[] array)
public static Any create(int integer)
IS_INT
integer - int valuepublic static Any create(long lng)
IS_INT
lng - long valuepublic static Any create(java.lang.Integer integer)
IS_INT
public static Any create(double dbl)
IS_DOUBLE
dbl - double valuepublic static Any create(java.lang.Double dbl)
IS_DOUBLE
dbl - java.lang.Double valuepublic static Any create(boolean bool)
IS_BOOLEAN
bool - boolean valuepublic static Any create(java.lang.Boolean bool)
IS_BOOLEAN
bool - java.lang.Boolean value
public static Any create(int type,
java.lang.String value)
type - type of valuevalue - string presentation of value of given typepublic static Any create(java.lang.Object object)
public static Any create(Any any)
any - Any valuepublic java.lang.Object clone()
clone in class java.lang.Objectprotected void _clone(Any source)
public Any copy()
protected void _copy(Any source)
public int sizeOf()
public ClassType classOf()
public Type type()
public int typeOf()
public final java.lang.String classNameOf()
public boolean isInstanceOf(Type ofType)
true if this any if of given type.public boolean isDefined()
undefined
returns false for this method.
true if this is other than undefinedpublic boolean isUndefined()
undefined.
true if this is undefinedpublic boolean isNull()
null.
true if this is nullpublic boolean isBoolean()
boolean.
true if this is booleanpublic boolean isInt()
int.
true if this is intpublic boolean isDouble()
float. In script the float is
used, but the implementation uses double.
true if this is floatpublic boolean isMutable()
public boolean isSequence()
public boolean isString()
string.
true if this is stringpublic boolean isBinary()
binary.
true if this is binarypublic boolean isTuple()
tuple.
true if this is tuplepublic boolean isList()
list.
true if this is listpublic boolean isArray()
array.
true if this is arraypublic boolean isPattern()
pattern.
true if this is patternpublic boolean isRange()
range.
true if this is rangepublic boolean isMap()
map.
true if this is mappublic boolean isBuffer()
buffer.
true if this is bufferpublic boolean isIterator()
iterator.
true if this is iteratorpublic boolean isRef()
public Any setRef(Any value)
public Any getRef()
public java.lang.Object toObject()
java.lang.Object.
public int toInt()
int.
int or zero if it can't be transformed.public byte toByte()
public long toLong()
long.
long or zero if it can't be transformed.public double toDouble()
double.
double or 0.0
if it can't be transformed.public boolean toBoolean()
boolean.
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".
public char toChar()
char. Value is converted to
string and first character is returned.
public java.lang.String toString()
String.
toString in class java.lang.ObjectString.public java.lang.StringBuffer toBuffer()
public java.lang.String toAnvil()
public java.io.Writer toAnvil(java.io.Writer writer)
throws java.io.IOException
java.io.IOExceptionpublic Code toCode(Code code)
public Array toArray()
Array.
public byte[] toBinary()
byte[].
byte[] or null if this instance
isn't AnyBinary.public Any[] toTuple()
Any[].
Any[] or null if this instance
isn't AnyTuple.public Any[] toList()
public java.util.regex.Pattern toPattern()
public AnyMap toMap()
public AnyRange toRange()
public Any toAnyBoolean()
AnyTrue or AnyFalse
AnyBoolean.public Any toAnyInt()
AnyInt.
AnyInt.public Any toAnyDouble()
AnyDouble.
AnyDouble.public Any toAnyString()
AnyString.
AnyString.public Any concat(Any any)
any - Value of add
public Any add(Any other)
public Any subtract(Any b)
public Any multiply(Any b)
this instance.
Will only work with integer and double.
public Any divide(Any b)
public Any modulo(Any b)
public Any increase()
public Any decrease()
public Any minus()
public Any plus()
public Any not()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objecttrue if equal, false otherwise.public final int compareTo(java.lang.Object obj)
Hashtable.
compareTo in interface java.lang.Comparablethis is less than paramter.
0 if equal.
1 if this if greater than parameter.protected int compare(Any other)
public Any coerce()
public void serialize(Serializer serializer)
throws java.io.IOException
java.io.IOException
protected void _serialize(Serializer serializer)
throws java.io.IOException
java.io.IOExceptionprotected void _wakeup(Context context)
protected void _unserialize(Unserializer unserializer)
throws UnserializationException
UnserializationExceptionpublic boolean contains(Any value)
public Any getAttribute(Context context,
java.lang.String attribute)
public Any setAttribute(Context context,
java.lang.String attribute,
Any value)
public boolean deleteAttribute(Context context,
java.lang.String attribute)
public Any getReference(Context context,
Any index)
public Any setReference(Context context,
Any index,
Any value)
public Any setReference(Context context,
Any value)
public boolean deleteReference(Context context,
Any index)
public BindingIterator iterator()
public Any execute(Context context,
Any[] parameters)
public Any execute(Context context)
public Any execute(Context context,
Any param1)
public Any execute(Context context,
Any param1,
Any param2)
public Any execute(Context context,
Any param1,
Any param2,
Any param3)
public Any execute(Context context,
Any param1,
Any param2,
Any param3,
Any param4)
public boolean has(java.lang.String methodName)
public Any invoke(Context context,
int methodIndex,
Any[] parameters)
public Any invoke(Context context,
int methodIndex)
public Any invoke(Context context,
int methodIndex,
Any param1)
public Any invoke(Context context,
int methodIndex,
Any param1,
Any param2)
public Any invoke(Context context,
int methodIndex,
Any param1,
Any param2,
Any param3)
public Any invoke(Context context,
int methodIndex,
Any param1,
Any param2,
Any param3,
Any param4)
public Any invoke(Context context,
java.lang.String methodName,
Any[] parameters)
public Any invoke(Context context,
java.lang.String methodName)
public Any invoke(Context context,
java.lang.String methodName,
Any param1)
public Any invoke(Context context,
java.lang.String methodName,
Any param1,
Any param2)
public Any invoke(Context context,
java.lang.String methodName,
Any param1,
Any param2,
Any param3)
public Any invoke(Context context,
java.lang.String methodName,
Any param1,
Any param2,
Any param3,
Any param4)
public Any _invoke(Context context,
int methodIndex,
Any[] parameters)
public Any _invoke(Context context,
int methodIndex)
public Any _invoke(Context context,
int methodIndex,
Any param1)
public Any _invoke(Context context,
int methodIndex,
Any param1,
Any param2)
public Any _invoke(Context context,
int methodIndex,
Any param1,
Any param2,
Any param3)
public Any _invoke(Context context,
int methodIndex,
Any param1,
Any param2,
Any param3,
Any param4)
public Any m_copy()
public Any m_clone()
public Any m_toBoolean()
public Any m_toString()
public Any m_hashCode()
public Any m_equals(Any other)
public Any m_compareTo(Any other)
public Any m_each(Context context,
Any callback)
public Any m_pipe(Context context,
Any converter)
public Any m_select(Context context,
Any selector)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DET | |||||||||