anvil.core
Class AnyTrue

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

public class AnyTrue
extends AnyBoolean

class AnyTrue.

Author:
Jani Lehtimäki

Field Summary
static NativeClass _class
           
static Any INSTANCE
           
static Any TRUE_STRING
           
 
Fields inherited from class anvil.core.AnyBoolean
newInstance
 
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
 int hashCode()
           
 Any not()
           
 void serialize(Serializer serializer)
           
 java.io.Writer toAnvil(java.io.Writer writer)
           
 Any toAnyBoolean()
          Gets the contained value as AnyTrue or AnyFalse
 Any toAnyString()
          Converts contained value into AnyString.
 boolean toBoolean()
          Gets the contained value as boolean.
 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.
 java.lang.Object toObject()
          Gets the contained value as java.lang.Object.
 java.lang.String toString()
          Converts contained value into String.
 
Methods inherited from class anvil.core.AnyBoolean
classOf, compare, equals, isBoolean, newInstance, typeOf
 
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, decrease, deleteAttribute, deleteReference, divide, execute, execute, execute, execute, execute, execute, getAttribute, getRef, getReference, has, increase, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, isArray, isBinary, isBuffer, isDefined, isDouble, isInstanceOf, isInt, isIterator, isList, isMap, isMutable, isNull, isPattern, isRange, isRef, isSequence, isString, isTuple, isUndefined, iterator, m_clone, m_compareTo, m_copy, m_each, m_equals, m_hashCode, m_pipe, m_select, m_toBoolean, m_toString, minus, modulo, multiply, plus, setAttribute, setRef, setReference, setReference, sizeOf, subtract, toAnvil, toAnyDouble, toAnyInt, toArray, toBinary, toBuffer, toByte, toList, toLong, toMap, toPattern, toRange, toTuple, type
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_class

public static final NativeClass _class

TRUE_STRING

public static final Any TRUE_STRING

INSTANCE

public static final Any INSTANCE
Method Detail

toBoolean

public final 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 final Any toAnyBoolean()
Description copied from class: Any
Gets the contained value as AnyTrue or AnyFalse

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

toInt

public final int toInt()
Description copied from class: Any
Gets the contained value as int.

Overrides:
toInt in class Any
Returns:
Value as int or zero if it can't be transformed.

toDouble

public final double toDouble()
Description copied from class: Any
Gets the contained value as double.

Overrides:
toDouble in class Any
Returns:
Value as double or 0.0 if it can't be transformed.

toChar

public final char toChar()
Description copied from class: Any
Gets the contained value as char. Value is converted to string and first character is returned.

Overrides:
toChar in class Any
Returns:
Value as char

toString

public final java.lang.String toString()
Description copied from class: Any
Converts contained value into String.

Overrides:
toString in class Any
Returns:
Value as String.

not

public Any not()
Overrides:
not in class Any

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

toAnyString

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

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

toObject

public final java.lang.Object toObject()
Description copied from class: Any
Gets the contained value as java.lang.Object.

Overrides:
toObject in class Any
Returns:
Value as Object.

hashCode

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

serialize

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