anvil.core
Class AnyUndefined

java.lang.Object
  |
  +--anvil.core.Any
        |
        +--anvil.core.AnyUndefined
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable

public final class AnyUndefined
extends Any

class AnyUndefin


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)
           
 Any decrease()
          Decrease the value by one.
 boolean deleteAttribute(Context context, java.lang.String attribute)
           
 boolean deleteReference(Context context, Any index)
           
 boolean equals(java.lang.Object obj)
          Tests for equality.
 Any getAttribute(Context context, java.lang.String attribute)
           
 Any getReference(Context context, Any index)
           
 int hashCode()
           
 Any increase()
          Increase the value by one.
 Any invoke(Context context, java.lang.String methodName, Any[] parameters)
           
 boolean isDefined()
          Checks if this any is defined.
 boolean isNull()
          Checks if this any is null.
 boolean isUndefined()
          Checks if this any is undefined.
 BindingIterator iterator()
           
 void serialize(Serializer serializer)
           
 Any setAttribute(Context context, java.lang.String attribute, Any value)
           
 Any setReference(Context context, Any value)
           
 Any setReference(Context context, Any index, Any value)
           
 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.
 byte[] toBinary()
          Gets the contained value as byte[].
 boolean toBoolean()
          Gets the contained value as boolean.
 Code toCode(Code code)
           
 int typeOf()
          Returns the type of contained value.
 
Methods inherited from class anvil.core.Any
_clone, _copy, _invoke, _invoke, _invoke, _invoke, _invoke, _invoke, _serialize, _unserialize, _wakeup, add, classNameOf, clone, coerce, compareTo, concat, contains, copy, create, create, create, create, create, create, create, create, create, create, create, create, create, create, divide, execute, execute, execute, execute, execute, execute, getRef, has, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, isArray, isBinary, isBoolean, isBuffer, isDouble, isInstanceOf, isInt, isIterator, isList, isMap, isMutable, isPattern, isRange, isRef, isSequence, isString, isTuple, m_clone, m_compareTo, m_copy, m_each, m_equals, m_hashCode, m_pipe, m_select, m_toBoolean, m_toString, minus, modulo, multiply, not, plus, setRef, sizeOf, subtract, toAnvil, toArray, toBuffer, toByte, toChar, toDouble, toInt, toList, toLong, toMap, toObject, toPattern, toRange, toString, toTuple, type
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_class

public static final NativeClass _class

INSTANCE

public static final Any INSTANCE
Method Detail

classOf

public ClassType classOf()
Description copied from class: Any
Returns the type of this Any.

Overrides:
classOf in class Any

typeOf

public int typeOf()
Description copied from class: Any
Returns the type of contained value.

Overrides:
typeOf in class Any
Returns:
Type of this any as int.

isDefined

public boolean isDefined()
Description copied from class: Any
Checks if this any is defined. Only undefined returns false for this method.

Overrides:
isDefined in class Any
Returns:
true if this is other than undefined

isUndefined

public boolean isUndefined()
Description copied from class: Any
Checks if this any is undefined.

Overrides:
isUndefined in class Any
Returns:
true if this is undefined

isNull

public boolean isNull()
Description copied from class: Any
Checks if this any is null.

Overrides:
isNull in class Any
Returns:
true if this is null

toAnvil

public java.io.Writer toAnvil(java.io.Writer writer)
                       throws java.io.IOException
Overrides:
toAnvil in class Any
java.io.IOException

toCode

public Code toCode(Code code)
Overrides:
toCode in class Any

toBoolean

public boolean toBoolean()
Description copied from class: Any
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".

Overrides:
toBoolean in class Any
Returns:
Value as boolean or false if it can't be transformed.

toAnyBoolean

public Any toAnyBoolean()
Description copied from class: Any
Gets the contained value as AnyTrue or AnyFalse

Overrides:
toAnyBoolean in class Any
Returns:
Value as AnyBoolean.

toAnyInt

public Any toAnyInt()
Description copied from class: Any
Gets the contained value as AnyInt.

Overrides:
toAnyInt in class Any
Returns:
Value as AnyInt.

toAnyDouble

public Any toAnyDouble()
Description copied from class: Any
Gets the contained value as AnyDouble.

Overrides:
toAnyDouble in class Any
Returns:
Value as AnyDouble.

toAnyString

public Any toAnyString()
Description copied from class: Any
Converts contained value into AnyString.

Overrides:
toAnyString in class Any
Returns:
Value as AnyString.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Description copied from class: Any
Tests for equality.

Overrides:
equals in class Any
Returns:
true if equal, false otherwise.

compare

protected int compare(Any other)
Overrides:
compare in class Any

getAttribute

public Any getAttribute(Context context,
                        java.lang.String attribute)
Overrides:
getAttribute in class Any

setAttribute

public Any setAttribute(Context context,
                        java.lang.String attribute,
                        Any value)
Overrides:
setAttribute in class Any

deleteAttribute

public boolean deleteAttribute(Context context,
                               java.lang.String attribute)
Overrides:
deleteAttribute in class Any

getReference

public Any getReference(Context context,
                        Any index)
Overrides:
getReference in class Any

setReference

public Any setReference(Context context,
                        Any index,
                        Any value)
Overrides:
setReference in class Any

setReference

public Any setReference(Context context,
                        Any value)
Overrides:
setReference in class Any

deleteReference

public boolean deleteReference(Context context,
                               Any index)
Overrides:
deleteReference in class Any

invoke

public Any invoke(Context context,
                  java.lang.String methodName,
                  Any[] parameters)
Overrides:
invoke in class Any

serialize

public void serialize(Serializer serializer)
               throws java.io.IOException
Overrides:
serialize in class Any
java.io.IOException

iterator

public BindingIterator iterator()
Overrides:
iterator in class Any

toBinary

public byte[] toBinary()
Description copied from class: Any
Gets the contained value as byte[].

Overrides:
toBinary in class Any
Returns:
Value as byte[] or null if this instance isn't AnyBinary.

increase

public Any increase()
Description copied from class: Any
Increase the value by one.

Overrides:
increase in class Any
Returns:
Increased value

decrease

public Any decrease()
Description copied from class: Any
Decrease the value by one.

Overrides:
decrease in class Any
Returns:
Decreased value