anvil.core
Class AnyList

java.lang.Object
  |
  +--anvil.core.Any
        |
        +--anvil.core.AnySequence
              |
              +--anvil.core.AnyList
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
AnyTuple

public class AnyList
extends AnySequence

class AnyList


Field Summary
protected  Any[] _array
           
static NativeClass _class
           
protected  int _size
           
 
Fields inherited from class anvil.core.AnySequence
p_append, p_concat, p_count, p_crop, p_cut, p_endsWith, p_fill, p_first, p_get, p_grep, p_indexOf, p_insert, p_join, p_last, p_lastIndexOf, p_pop, p_push, p_repeat, p_resize, p_reverse, p_search, p_set, p_slice, p_sort, p_startsWith, p_swap, p_unshift
 
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
 
Constructor Summary
AnyList()
           
AnyList(Any[] array)
           
AnyList(Any[] array, int size)
           
 
Method Summary
 AnySequence append(Any element)
           
 AnySequence append(AnySequence sequence)
           
 ClassType classOf()
          Returns the type of this Any.
 AnySequence clear()
           
 java.lang.Object clone()
          Returns shallow copy from this any.
 int compareAt(Any element, int start)
           
 int compareAt(AnySequence sequence, int start, int length)
           
 Any copy()
          Returns deep copy from this any.
 AnySequence createEmptySequence()
           
 AnySequence createSequence(Any element)
           
 AnySequence crop(int start, int length)
           
 AnySequence deleteSlice(int start, int length)
           
 void ensureCapacity(int size)
           
 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)
           
 AnySequence fill(Any fill, int start, int length)
           
 Any getAttribute(Context context, java.lang.String attribute)
           
 Any getElement(int index)
           
 int getSize()
           
 AnySequence getSlice(int start, int length)
           
 boolean isCompatible(Any element)
           
 boolean isList()
          Checks if this any is list.
static Any newInstance(Any[] list)
           
 AnySequence resize(int size)
           
 int search(Any element, java.util.Comparator comparator)
           
 void serialize(Serializer serializer)
           
 AnySequence setElement(int index, Any element)
           
 AnySequence setSlice(int start, int length, Any element)
           
 AnySequence setSlice(int start, int length, AnySequence sequence)
           
 AnySequence sort(int start, int length, java.util.Comparator comparator)
           
 AnySequence swap(int index1, int index2)
           
 java.io.Writer toAnvil(java.io.Writer writer)
           
 Code toCode(Code code)
           
 Any[] toList()
           
 java.lang.Object toObject()
          Gets the contained value as java.lang.Object.
 java.lang.String toString()
          Converts contained value into String.
 Any[] toTuple()
          Gets the contained value as Any[].
 int typeOf()
          Returns the type of contained value.
static AnyList unserialize(Unserializer unserializer)
           
 
Methods inherited from class anvil.core.AnySequence
add, compare, compareTo, contains, deleteReference, equals, equalsTo, getReference, getReference, indexOf, isMutable, isSequence, iterator, lastIndexOf, m_append, m_clear, m_concat, m_count, m_crop, m_cut, m_endsWith, m_fill, m_first, m_get, m_grep, m_indexOf, m_insert, m_join, m_last, m_lastIndexOf, m_length, m_minmax, m_pop, m_push, m_repeat, m_resize, m_reverse, m_search, m_set, m_shift, m_slice, m_sort, m_startsWith, m_swap, m_unshift, reverse, setReference, setReference, sizeOf, toBoolean
 
Methods inherited from class anvil.core.Any
_clone, _copy, _invoke, _invoke, _invoke, _invoke, _invoke, _invoke, _serialize, _unserialize, _wakeup, classNameOf, coerce, compareTo, concat, create, create, create, create, create, create, create, create, create, create, create, create, create, create, decrease, deleteAttribute, divide, getRef, has, increase, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, isArray, isBinary, isBoolean, isBuffer, isDefined, isDouble, isInstanceOf, isInt, isIterator, isMap, isNull, isPattern, isRange, isRef, 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, setAttribute, setRef, subtract, toAnvil, toAnyBoolean, toAnyDouble, toAnyInt, toAnyString, toArray, toBinary, toBuffer, toByte, toChar, toDouble, toInt, toLong, toMap, toPattern, toRange, type
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_class

public static final transient NativeClass _class

_array

protected Any[] _array

_size

protected int _size
Constructor Detail

AnyList

public AnyList()

AnyList

public AnyList(Any[] array)

AnyList

public AnyList(Any[] array,
               int size)
Method Detail

newInstance

public static Any newInstance(Any[] list)

isCompatible

public boolean isCompatible(Any element)
Specified by:
isCompatible in class AnySequence

getSize

public int getSize()
Specified by:
getSize in class AnySequence

resize

public AnySequence resize(int size)
Specified by:
resize in class AnySequence

clear

public AnySequence clear()
Specified by:
clear in class AnySequence

ensureCapacity

public void ensureCapacity(int size)

getElement

public Any getElement(int index)
Specified by:
getElement in class AnySequence

setElement

public AnySequence setElement(int index,
                              Any element)
Specified by:
setElement in class AnySequence

crop

public AnySequence crop(int start,
                        int length)
Specified by:
crop in class AnySequence

getSlice

public AnySequence getSlice(int start,
                            int length)
Specified by:
getSlice in class AnySequence

deleteSlice

public AnySequence deleteSlice(int start,
                               int length)
Specified by:
deleteSlice in class AnySequence

setSlice

public AnySequence setSlice(int start,
                            int length,
                            Any element)
Specified by:
setSlice in class AnySequence

setSlice

public AnySequence setSlice(int start,
                            int length,
                            AnySequence sequence)
Specified by:
setSlice in class AnySequence

append

public AnySequence append(AnySequence sequence)
Specified by:
append in class AnySequence

append

public AnySequence append(Any element)
Specified by:
append in class AnySequence

createSequence

public AnySequence createSequence(Any element)
Specified by:
createSequence in class AnySequence

createEmptySequence

public AnySequence createEmptySequence()
Specified by:
createEmptySequence in class AnySequence

compareAt

public int compareAt(AnySequence sequence,
                     int start,
                     int length)
Specified by:
compareAt in class AnySequence

compareAt

public int compareAt(Any element,
                     int start)
Specified by:
compareAt in class AnySequence

fill

public AnySequence fill(Any fill,
                        int start,
                        int length)
Specified by:
fill in class AnySequence

sort

public AnySequence sort(int start,
                        int length,
                        java.util.Comparator comparator)
Specified by:
sort in class AnySequence

search

public int search(Any element,
                  java.util.Comparator comparator)
Specified by:
search in class AnySequence

swap

public AnySequence swap(int index1,
                        int index2)
Specified by:
swap in class AnySequence

classOf

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

Overrides:
classOf in class AnySequence

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.

isList

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

Overrides:
isList in class Any
Returns:
true if this is list

toTuple

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

Overrides:
toTuple in class Any
Returns:
Value as Any[] or null if this instance isn't AnyTuple.

toList

public Any[] toList()
Overrides:
toList in class Any

toObject

public 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.

toString

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

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

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

clone

public java.lang.Object clone()
Description copied from class: Any
Returns shallow copy from this any.

Overrides:
clone in class Any
Returns:
Shallow copy

copy

public Any copy()
Description copied from class: Any
Returns deep copy from this any.

Overrides:
copy in class Any

serialize

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

unserialize

public static AnyList unserialize(Unserializer unserializer)
                           throws UnserializationException
UnserializationException

execute

public Any execute(Context context,
                   Any[] parameters)
Overrides:
execute in class Any

execute

public Any execute(Context context)
Overrides:
execute in class Any

execute

public Any execute(Context context,
                   Any param1)
Overrides:
execute in class Any

execute

public Any execute(Context context,
                   Any param1,
                   Any param2)
Overrides:
execute in class Any

execute

public Any execute(Context context,
                   Any param1,
                   Any param2,
                   Any param3)
Overrides:
execute in class Any

execute

public Any execute(Context context,
                   Any param1,
                   Any param2,
                   Any param3,
                   Any param4)
Overrides:
execute in class Any

getAttribute

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