anvil.core
Class AnyNull

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

public final class AnyNull
extends Any

class AnyNull


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 equals(java.lang.Object obj)
          Tests for equality.
 int hashCode()
           
 Any increase()
          Increase the value by one.
 boolean isNull()
          Checks if this any is null.
 BindingIterator iterator()
           
 byte[] toBinary()
          Gets the contained value as byte[].
 boolean toBoolean()
          Gets the contained value as boolean.
 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, deleteAttribute, deleteReference, divide, execute, execute, execute, execute, execute, execute, getAttribute, getRef, getReference, has, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, isArray, isBinary, isBoolean, isBuffer, isDefined, isDouble, isInstanceOf, isInt, isIterator, isList, isMap, isMutable, isPattern, isRange, isRef, isSequence, isString, isTuple, isUndefined, 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, serialize, setAttribute, setRef, setReference, setReference, sizeOf, subtract, toAnvil, toAnvil, toAnyBoolean, toAnyDouble, toAnyInt, toAnyString, toArray, toBuffer, toByte, toChar, toCode, 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

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.

classOf

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

Overrides:
classOf in class Any

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

iterator

public BindingIterator iterator()
Overrides:
iterator in class Any

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

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.

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