| java.lang.Object anvil.core.Any
All known Subclasses: anvil.core.AnyInfinity, anvil.core.AnyAbstractClass, anvil.core.AnyRef, anvil.core.AnyUndefined, anvil.core.Array, anvil.core.AnyBoolean, anvil.core.AnyClass, anvil.core.AnyRange, anvil.core.AnyNegativeInfinity, anvil.core.AnyMap, anvil.core.AnyNull, anvil.core.AnyNumber, anvil.core.AnyPattern, anvil.core.AnySequence,
Inner Class :public static class Op | |
Constructor Summary | |
protected | Any() Constructs Any containing IS_NULL . |
Method Summary | |
public Any | add(Any other) Adds two Any's together. | public Any | and(Any any) Logical AND. | public boolean | booleanAnd(Any any) Logical AND. | public boolean | booleanNot() Perform logical negation. | public boolean | booleanOr(Any any) Logical OR. | public Any | checkAttribute(Context context, String attribute) | public Any | checkReference(Context context, Any index) | final public String | classNameOf() | public anvil.script.ClassType | classOf() Returns the type of this Any. | public Object | clone() Returns shallow copy from this any. | public Any | coerce() | protected int | compare(Any other) | final public int | compareTo(Object obj) Compares two Any's. | public Any | concat(Any any) Concatenated two Any's together. | public boolean | contains(Any value) | public Any | copy() Returns deep copy from this any. | public static Any | create() Constructs Any containing IS_NULL . | public static Any | create(char ch) Constructs Any containing IS_STRING
with length == 1 and charAt(0) == ch. | public static Any | create(String string) | public static Any | create(String[] array) | public static Any | create(int integer) | public static Any | create(long lng) | public static Any | create(Integer integer) | public static Any | create(double dbl) | public static Any | create(Double dbl) | public static Any | create(boolean bool) | public static Any | create(Boolean bool) | public static Any | create(int type, String value) | public static Any | create(Object object) | public static Any | create(Any any) | public Any | decrease() Decrease the value by one. | public boolean | deleteAttribute(Context context, String attribute) | public boolean | deleteReference(Context context, Any index) | public Any | divide(Any b) Divide two Any's. | public BindingEnumeration | enumeration() | public boolean | equals(Object obj) Tests for equality. | 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 Any | getAttribute(Context context, String attribute) | public Any | getRef() | public Any | getReference(Context context, Any index) | public boolean | has(String methodName) | public int | hashCode() Calculates the hashcode of this Any. | public Any | increase() Increase the value by one. | 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, String methodName, Any[] parameters) | public Any | invoke(Context context, String methodName) | public Any | invoke(Context context, String methodName, Any param1) | public Any | invoke(Context context, String methodName, Any param1, Any param2) | public Any | invoke(Context context, String methodName, Any param1, Any param2, Any param3) | public Any | invoke(Context context, String methodName, Any param1, Any param2, Any param3, Any param4) | public boolean | isArray() Checks if this any is array . | public boolean | isBinary() Checks if this any is binary . | public boolean | isBoolean() Checks if this any is boolean . | public boolean | isBuffer() Checks if this any is buffer . | public boolean | isClass() Checks if this any is class . | public boolean | isDefined() Checks if this any is defined. | public boolean | isDouble() Checks if this any is float . | public boolean | isEnumeration() Checks if this any is enumeration . | public boolean | isInstanceOf(Type ofType) Checks if this any is of given type.
Parameters: ofClass - Type to check against. | public boolean | isInt() Checks if this any is int . | public boolean | isList() Checks if this any is list . | public boolean | isMap() Checks if this any is map . | public boolean | isMutable() | public boolean | isNull() Checks if this any is null . | public boolean | isPattern() Checks if this any is pattern . | public boolean | isRange() Checks if this any is range . | public boolean | isRef() | public boolean | isSequence() | public boolean | isString() Checks if this any is string . | public boolean | isTuple() Checks if this any is tuple . | public boolean | isUndefined() Checks if this any is undefined . | public Any | m_clone() | public Any | m_compareTo(Any other) | public Any | m_copy() | public Any | m_equals(Any other) | public Any | m_hashCode() | public Any | m_toBoolean() | public Any | m_toString() | public Any | minus() Negate the sign. | public Any | modulo(Any b) Calculate the remainder. | public Any | multiply(Any b) Multiply two Any's. | public ScriptException | nonExistentMethod(Context context, int methodIndex) | public Any | not() Perform logical negation. | public Any | or(Any any) Logical OR. | public ScriptException | parametersMissing(Context context, String method) | public ScriptException | parametersMissing(Context context, int methodIndex) | public Any | plus() Remove the sign. | public void | serialize(Serializer serializer) | public Any | setAttribute(Context context, String attribute, Any value) | public void | setRef(Any value) | public Any | setReference(Context context, Any index, Any value) | public Any | setReference(Context context, Any value) | public int | sizeOf() Returns the logical size of this any. | public Any | subtract(Any b) Substract two Any's. | public String | toAnvil() Converts contained value into value anvil code. | public Writer | toAnvil(Writer writer) | public Any | toAnyBoolean() | public Any | toAnyDouble() Gets the contained value as AnyDouble . | public Any | toAnyInt() Gets the contained value as AnyInt . | public Any | toAnyString() Converts contained value into AnyString . | public Array | toArray() Gets the contained vaelue as Array . | public byte[] | toBinary() Gets the contained value as byte[] . | public boolean | toBoolean() Gets the contained value as boolean . | public StringBuffer | toBuffer() | public byte | toByte() | public char | toChar() Gets the contained value as char . | public AnyClass | toClass() | public anvil.codec.Code | toCode(anvil.codec.Code code) | public double | toDouble() Gets the contained value as double . | public int | toInt() Gets the contained value as int . | public String | toJava() | public Writer | toJava(Writer writer) | public Any[] | toList() | public long | toLong() Gets the contained value as long . | public AnyMap | toMap() | public Object | toObject() Gets the contained value as java.lang.Object . | public Pattern | toPattern() | public AnyRange | toRange() | public String | toString() Converts contained value into String . | public Any[] | toTuple() Gets the contained value as Any[] . | public Type | type() | public int | typeOf() Returns the type of contained value. |
ARRAY0 | final public static transient Any[] ARRAY0(Code) | | |
DOUBLE_MINUS_ONE | final public static transient Any DOUBLE_MINUS_ONE(Code) | | |
DOUBLE_ONE | final public static transient Any DOUBLE_ONE(Code) | | |
DOUBLE_ZERO | final public static transient Any DOUBLE_ZERO(Code) | | |
EMPTY_STRING | final public static transient Any EMPTY_STRING(Code) | | |
FALSE | final public static transient Any FALSE(Code) | | |
INF | final public static transient Any INF(Code) | | |
IS_ARRAY | final public static transient int IS_ARRAY(Code) | | |
IS_BINARY | final public static transient int IS_BINARY(Code) | | |
IS_BOOLEAN | final public static transient int IS_BOOLEAN(Code) | | |
IS_BUFFER | final public static transient int IS_BUFFER(Code) | | |
IS_CLASS | final public static transient int IS_CLASS(Code) | | |
IS_DOUBLE | final public static transient int IS_DOUBLE(Code) | | |
IS_ENUMERATION | final public static transient int IS_ENUMERATION(Code) | | |
IS_INF | final public static transient int IS_INF(Code) | | |
IS_INT | final public static transient int IS_INT(Code) | | |
IS_LIST | final public static transient int IS_LIST(Code) | | |
IS_MAP | final public static transient int IS_MAP(Code) | | |
IS_NEG_INF | final public static transient int IS_NEG_INF(Code) | | |
IS_NULL | final public static transient int IS_NULL(Code) | | |
IS_PATTERN | final public static transient int IS_PATTERN(Code) | | |
IS_RANGE | final public static transient int IS_RANGE(Code) | | |
IS_REF | final public static transient int IS_REF(Code) | | |
IS_STRING | final public static transient int IS_STRING(Code) | | |
IS_TUPLE | final public static transient int IS_TUPLE(Code) | | |
IS_UNDEFINED | final public static transient int IS_UNDEFINED(Code) | | |
MINUS_ONE | final public static transient Any MINUS_ONE(Code) | | |
NAN | final public static transient Any NAN(Code) | | |
NEG_INF | final public static transient Any NEG_INF(Code) | | |
NULL | final public static transient Any NULL(Code) | | |
ONE | final public static transient Any ONE(Code) | | |
TRUE | final public static transient Any TRUE(Code) | | |
TWO | final public static transient Any TWO(Code) | | |
UNDEFINED | final public static transient Any UNDEFINED(Code) | | |
ZERO | final public static transient Any ZERO(Code) | | |
Any | protected Any()(Code) | | Constructs Any containing IS_NULL .
|
add | public Any add(Any other)(Code) | | Adds two Any's together.
Parameters: any - Value of add Calculated value |
and | public Any and(Any any)(Code) | | Logical AND.
Parameters: any - Any Result of AND |
booleanAnd | public boolean booleanAnd(Any any)(Code) | | Logical AND.
Parameters: any - Any Result of AND |
booleanNot | public boolean booleanNot()(Code) | | Perform logical negation.
Will only work with boolean, integer and double.
Negated value |
booleanOr | public boolean booleanOr(Any any)(Code) | | Logical OR.
Parameters: any - Any Result of OR |
classNameOf | final public String classNameOf()(Code) | | Returns the classname of contained object
|
clone | public Object clone()(Code) | | Returns shallow copy from this any.
Shallow copy |
compare | protected int compare(Any other)(Code) | | |
compareTo | final public int compareTo(Object obj)(Code) | | Compares two Any's. Will not work with Hashtable .
Parameters: any - Value to compare with -1 if this is less than paramter.0 if equal.1 if this if greater than parameter. |
concat | public Any concat(Any any)(Code) | | Concatenated two Any's together. Returned type will be IS_STRING.
Parameters: any - Value of add Calculated value |
contains | public boolean contains(Any value)(Code) | | |
copy | public Any copy()(Code) | | Returns deep copy from this any.
|
create | public static Any create()(Code) | | Constructs Any containing IS_NULL .
|
create | public static Any create(char ch)(Code) | | Constructs Any containing IS_STRING
with length == 1 and charAt(0) == ch.
Parameters: string - String value |
create | public static Any create(String string)(Code) | | Constructs Any containing IS_STRING
Parameters: string - String value |
create | public static Any create(int integer)(Code) | | Constructs Any containing IS_INT
Parameters: integer - int value |
create | public static Any create(long lng)(Code) | | Constructs Any containing IS_INT
Parameters: lng - long value |
create | public static Any create(Integer integer)(Code) | | Constructs Any containing IS_INT
Parameters: i - java.lang.Integer value |
create | public static Any create(double dbl)(Code) | | Constructs Any containing IS_DOUBLE
Parameters: dbl - double value |
create | public static Any create(Double dbl)(Code) | | Constructs Any containing IS_DOUBLE
Parameters: dbl - java.lang.Double value |
create | public static Any create(boolean bool)(Code) | | Constructs Any containing IS_BOOLEAN
Parameters: bool - boolean value |
create | public static Any create(Boolean bool)(Code) | | Constructs Any containing IS_BOOLEAN
Parameters: bool - java.lang.Boolean value |
create | public static Any create(int type, String value)(Code) | | Constructs Any with spefified type and value
Parameters: type - type of value Parameters: value - string presentation of value of given type |
create | public static Any create(Any any)(Code) | | Constructs Any from another Any instance
Parameters: any - Any value |
decrease | public Any decrease()(Code) | | Decrease the value by one.
Decreased value |
divide | public Any divide(Any b)(Code) | | Divide two Any's.
Parameters: any - Divider Calculated value |
equals | public boolean equals(Object obj)(Code) | | Tests for equality.
Parameters: o - Object to check. Valid types areBoolean , Integer , Double , String , Array and Any .No conversions are made, so, if the actual type doesn't match between two objects false is returned. true if equal, false otherwise. |
hashCode | public int hashCode()(Code) | | Calculates the hashcode of this Any.
Hashcode. |
increase | public Any increase()(Code) | | Increase the value by one.
Increased value |
isArray | public boolean isArray()(Code) | | Checks if this any is array .
true if this is array |
isBinary | public boolean isBinary()(Code) | | Checks if this any is binary .
true if this is binary |
isBoolean | public boolean isBoolean()(Code) | | Checks if this any is boolean .
true if this is boolean |
isBuffer | public boolean isBuffer()(Code) | | Checks if this any is buffer .
true if this is buffer |
isClass | public boolean isClass()(Code) | | Checks if this any is class .
true if this is class |
isDefined | public boolean isDefined()(Code) | | Checks if this any is defined. Only undefined
returns false for this method.
true if this is other than undefined |
isDouble | public boolean isDouble()(Code) | | Checks if this any is float . In script the float is
used, but the implementation uses double.
true if this is float |
isEnumeration | public boolean isEnumeration()(Code) | | Checks if this any is enumeration .
true if this is enumeration |
isInstanceOf | public boolean isInstanceOf(Type ofType)(Code) | | Checks if this any is of given type.
Parameters: ofClass - Type to check against. true if this any if of given type. |
isInt | public boolean isInt()(Code) | | Checks if this any is int .
true if this is int |
isList | public boolean isList()(Code) | | Checks if this any is list .
true if this is list |
isMap | public boolean isMap()(Code) | | Checks if this any is map .
true if this is map |
isMutable | public boolean isMutable()(Code) | | |
isNull | public boolean isNull()(Code) | | Checks if this any is null .
true if this is null |
isPattern | public boolean isPattern()(Code) | | Checks if this any is pattern .
true if this is pattern |
isRange | public boolean isRange()(Code) | | Checks if this any is range .
true if this is range |
isRef | public boolean isRef()(Code) | | |
isSequence | public boolean isSequence()(Code) | | |
isString | public boolean isString()(Code) | | Checks if this any is string .
true if this is string |
isTuple | public boolean isTuple()(Code) | | Checks if this any is tuple .
true if this is tuple |
isUndefined | public boolean isUndefined()(Code) | | Checks if this any is undefined .
true if this is undefined |
m_copy | public Any m_copy()(Code) | | Exposed methods ***********
|
minus | public Any minus()(Code) | | Negate the sign.
Negated value |
modulo | public Any modulo(Any b)(Code) | | Calculate the remainder.
Parameters: any - Divider for modulus Calculated value |
multiply | public Any multiply(Any b)(Code) | | Multiply two Any's. Returned type will be the
same as of this instance.
Will only work with integer and double.
Parameters: any - Multiplicator Calculated value |
not | public Any not()(Code) | | Perform logical negation.
Will only work with boolean, integer and double.
Negated value |
or | public Any or(Any any)(Code) | | Logical OR.
Parameters: any - Any Result of OR |
plus | public Any plus()(Code) | | Remove the sign.
Value, with sign removed |
sizeOf | public int sizeOf()(Code) | | Returns the logical size of this any.
Logical size |
subtract | public Any subtract(Any b)(Code) | | Substract two Any's.
Parameters: any - Value of subtract Calculated value |
toAnvil | public String toAnvil()(Code) | | Converts contained value into value anvil code.
Value as anvil code. |
toAnyBoolean | public Any toAnyBoolean()(Code) | | Gets the contained value as AnyTrue or AnyFalse
Value as AnyBoolean . |
toAnyDouble | public Any toAnyDouble()(Code) | | Gets the contained value as AnyDouble .
Value as AnyDouble . |
toAnyInt | public Any toAnyInt()(Code) | | Gets the contained value as AnyInt .
Value as AnyInt . |
toAnyString | public Any toAnyString()(Code) | | Converts contained value into AnyString .
Value as AnyString . |
toArray | public Array toArray()(Code) | | Gets the contained vaelue as Array .
Value as Array or null if this instance doesn't contain Array. |
toBinary | public byte[] toBinary()(Code) | | Gets the contained value as byte[] .
Value as byte[] or null if this instance isn't AnyBinary . |
toBoolean | public boolean toBoolean()(Code) | | Gets the contained value as 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" .
Value as boolean or false if it can't be transformed. |
toByte | public byte toByte()(Code) | | |
toChar | public char toChar()(Code) | | Gets the contained value as char . Value is converted to
string and first character is returned.
Value as char |
toDouble | public double toDouble()(Code) | | Gets the contained value as double .
Value as double or 0.0 if it can't be transformed. |
toInt | public int toInt()(Code) | | Gets the contained value as int .
Value as int or zero if it can't be transformed. |
toLong | public long toLong()(Code) | | Gets the contained value as long .
Value as long or zero if it can't be transformed. |
toObject | public Object toObject()(Code) | | Gets the contained value as java.lang.Object .
Value as Object. |
toPattern | public Pattern toPattern()(Code) | | |
toString | public String toString()(Code) | | Converts contained value into String .
Value as String . |
toTuple | public Any[] toTuple()(Code) | | Gets the contained value as Any[] .
Value as Any[] or null if this instance isn't AnyTuple. |
typeOf | public int typeOf()(Code) | | Returns the type of contained value.
Type of this any as int. |
|
|