anvil.core
Class AnySequence
java.lang.Object
|
+--anvil.core.Any
|
+--anvil.core.AnySequence
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable
- Direct Known Subclasses:
- AnyArray, AnyBinary, AnyBuffer, AnyList, AnyString
- public abstract class AnySequence
- extends Any
| 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 |
Any |
add(Any other)
Adds two Any's together. |
abstract AnySequence |
append(Any element)
|
abstract AnySequence |
append(AnySequence sequence)
|
ClassType |
classOf()
Returns the type of this Any. |
abstract AnySequence |
clear()
|
protected int |
compare(Any other)
|
abstract int |
compareAt(Any value,
int start)
|
abstract int |
compareAt(AnySequence sequence,
int start,
int length)
|
int |
compareTo(AnySequence sequence)
|
boolean |
contains(Any value)
|
abstract AnySequence |
createEmptySequence()
|
abstract AnySequence |
createSequence(Any element)
|
abstract AnySequence |
crop(int start,
int length)
|
boolean |
deleteReference(Context context,
Any index)
|
abstract AnySequence |
deleteSlice(int start,
int length)
|
boolean |
equals(java.lang.Object obj)
Tests for equality. |
boolean |
equalsTo(AnySequence sequence)
|
abstract AnySequence |
fill(Any fill,
int start,
int length)
|
Any |
getAttribute(Context context,
java.lang.String attribute)
|
abstract Any |
getElement(int index)
|
AnySequence |
getReference(AnySequence sequence,
Any index)
|
Any |
getReference(Context context,
Any index)
|
abstract int |
getSize()
|
abstract AnySequence |
getSlice(int start,
int length)
|
int |
indexOf(Any element,
int start)
|
abstract boolean |
isCompatible(Any type)
|
boolean |
isMutable()
|
boolean |
isSequence()
|
BindingIterator |
iterator()
|
int |
lastIndexOf(Any element,
int start)
|
Any |
m_append(Any element)
|
Any |
m_clear()
|
Any |
m_concat(Any element)
|
Any |
m_count(Any element)
|
Any |
m_crop(int start,
Any length_)
|
Any |
m_cut(int start,
Any length_)
|
Any |
m_endsWith(Any element)
|
Any |
m_fill(Any element,
Any start_,
Any end_)
|
Any |
m_first(Any index_)
|
Any |
m_get(Any[] parameters)
|
Any |
m_grep(Context context,
Any pattern_)
|
Any |
m_indexOf(Any needle,
int from)
|
Any |
m_insert(int start,
Any p1,
Any p2)
|
Any |
m_join(java.lang.String clue)
|
Any |
m_last(Any index_)
|
Any |
m_lastIndexOf(Any needle,
Any from)
|
Any |
m_length()
|
Any |
m_minmax()
|
Any |
m_pop(Any index_)
|
Any |
m_push(Any element,
Any[] parameters)
|
Any |
m_repeat(int count)
|
Any |
m_resize(int length)
|
Any |
m_reverse(int start,
Any length_)
|
Any |
m_search(Context context,
Any element,
Any comparator_)
|
Any |
m_set(Context context,
Any[] parameters)
|
Any |
m_shift()
|
Any |
m_slice(int start,
Any length_)
|
Any |
m_sort(Context context,
int start,
Any length_,
Any comparator_)
|
Any |
m_startsWith(Any element)
|
Any |
m_swap(int index1,
int index2)
|
Any |
m_unshift(Any element,
Any[] parameters)
|
abstract AnySequence |
resize(int size)
|
AnySequence |
reverse(int start,
int length)
|
abstract int |
search(Any element,
java.util.Comparator comparator)
|
abstract AnySequence |
setElement(int index,
Any element)
|
Any |
setReference(Context context,
Any value)
|
Any |
setReference(Context context,
Any index,
Any value)
|
abstract AnySequence |
setSlice(int start,
int length,
Any element)
|
abstract AnySequence |
setSlice(int start,
int length,
AnySequence element)
|
int |
sizeOf()
Returns the logical size of this any. |
abstract AnySequence |
sort(int start,
int length,
java.util.Comparator comparator)
|
abstract AnySequence |
swap(int index1,
int index2)
|
boolean |
toBoolean()
Gets the contained value as boolean. |
| Methods inherited from class anvil.core.Any |
_clone, _copy, _invoke, _invoke, _invoke, _invoke, _invoke, _invoke, _serialize, _unserialize, _wakeup, classNameOf, clone, coerce, compareTo, concat, copy, create, create, create, create, create, create, create, create, create, create, create, create, create, create, decrease, deleteAttribute, divide, execute, execute, execute, execute, execute, execute, getRef, has, increase, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, isArray, isBinary, isBoolean, isBuffer, isDefined, isDouble, isInstanceOf, isInt, isIterator, isList, 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, serialize, setAttribute, setRef, subtract, toAnvil, toAnvil, toAnyBoolean, toAnyDouble, toAnyInt, toAnyString, toArray, toBinary, toBuffer, toByte, toChar, toCode, toDouble, toInt, toList, toLong, toMap, toObject, toPattern, toRange, toString, toTuple, type, typeOf |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
p_resize
public static final java.lang.Object[] p_resize
p_fill
public static final java.lang.Object[] p_fill
p_startsWith
public static final java.lang.Object[] p_startsWith
p_endsWith
public static final java.lang.Object[] p_endsWith
p_indexOf
public static final java.lang.Object[] p_indexOf
p_lastIndexOf
public static final java.lang.Object[] p_lastIndexOf
p_append
public static final java.lang.Object[] p_append
p_concat
public static final java.lang.Object[] p_concat
p_crop
public static final java.lang.Object[] p_crop
p_slice
public static final java.lang.Object[] p_slice
p_cut
public static final java.lang.Object[] p_cut
p_insert
public static final java.lang.Object[] p_insert
p_swap
public static final java.lang.Object[] p_swap
p_reverse
public static final java.lang.Object[] p_reverse
p_sort
public static final java.lang.Object[] p_sort
p_search
public static final java.lang.Object[] p_search
p_repeat
public static final java.lang.Object[] p_repeat
p_count
public static final java.lang.Object[] p_count
p_push
public static final java.lang.Object[] p_push
p_pop
public static final java.lang.Object[] p_pop
p_unshift
public static final java.lang.Object[] p_unshift
p_first
public static final java.lang.Object[] p_first
p_last
public static final java.lang.Object[] p_last
p_join
public static final java.lang.Object[] p_join
p_get
public static final java.lang.Object[] p_get
p_set
public static final java.lang.Object[] p_set
p_grep
public static final java.lang.Object[] p_grep
_class
public static final transient NativeClass _class
AnySequence
public AnySequence()
isCompatible
public abstract boolean isCompatible(Any type)
clear
public abstract AnySequence clear()
getSize
public abstract int getSize()
resize
public abstract AnySequence resize(int size)
getElement
public abstract Any getElement(int index)
setElement
public abstract AnySequence setElement(int index,
Any element)
swap
public abstract AnySequence swap(int index1,
int index2)
crop
public abstract AnySequence crop(int start,
int length)
getSlice
public abstract AnySequence getSlice(int start,
int length)
setSlice
public abstract AnySequence setSlice(int start,
int length,
Any element)
setSlice
public abstract AnySequence setSlice(int start,
int length,
AnySequence element)
deleteSlice
public abstract AnySequence deleteSlice(int start,
int length)
append
public abstract AnySequence append(AnySequence sequence)
append
public abstract AnySequence append(Any element)
createEmptySequence
public abstract AnySequence createEmptySequence()
createSequence
public abstract AnySequence createSequence(Any element)
compareAt
public abstract int compareAt(Any value,
int start)
compareAt
public abstract int compareAt(AnySequence sequence,
int start,
int length)
fill
public abstract AnySequence fill(Any fill,
int start,
int length)
sort
public abstract AnySequence sort(int start,
int length,
java.util.Comparator comparator)
search
public abstract int search(Any element,
java.util.Comparator comparator)
reverse
public AnySequence reverse(int start,
int length)
indexOf
public int indexOf(Any element,
int start)
lastIndexOf
public int lastIndexOf(Any element,
int start)
equalsTo
public boolean equalsTo(AnySequence sequence)
compareTo
public int compareTo(AnySequence sequence)
classOf
public ClassType classOf()
- Description copied from class:
Any
- Returns the type of this Any.
- Overrides:
classOf in class Any
sizeOf
public int sizeOf()
- Description copied from class:
Any
- Returns the logical size of this any.
- Overrides:
sizeOf in class Any
- Returns:
- Logical size
isMutable
public boolean isMutable()
- Overrides:
isMutable in class Any
isSequence
public boolean isSequence()
- Overrides:
isSequence 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.
getReference
public AnySequence getReference(AnySequence sequence,
Any index)
getReference
public Any getReference(Context context,
Any index)
- Overrides:
getReference 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
setReference
public Any setReference(Context context,
Any index,
Any value)
- Overrides:
setReference in class Any
getAttribute
public Any getAttribute(Context context,
java.lang.String attribute)
- Overrides:
getAttribute in class Any
contains
public boolean contains(Any value)
- Overrides:
contains in class Any
add
public Any add(Any other)
- Description copied from class:
Any
- Adds two Any's together.
- Overrides:
add in class Any
- Returns:
- Calculated value
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
iterator
public BindingIterator iterator()
- Overrides:
iterator in class Any
m_length
public Any m_length()
m_resize
public Any m_resize(int length)
m_clear
public Any m_clear()
m_fill
public Any m_fill(Any element,
Any start_,
Any end_)
m_startsWith
public Any m_startsWith(Any element)
m_endsWith
public Any m_endsWith(Any element)
m_indexOf
public Any m_indexOf(Any needle,
int from)
m_lastIndexOf
public Any m_lastIndexOf(Any needle,
Any from)
m_append
public Any m_append(Any element)
m_concat
public Any m_concat(Any element)
m_crop
public Any m_crop(int start,
Any length_)
m_slice
public Any m_slice(int start,
Any length_)
m_cut
public Any m_cut(int start,
Any length_)
m_insert
public Any m_insert(int start,
Any p1,
Any p2)
m_minmax
public Any m_minmax()
m_swap
public Any m_swap(int index1,
int index2)
m_reverse
public Any m_reverse(int start,
Any length_)
m_sort
public Any m_sort(Context context,
int start,
Any length_,
Any comparator_)
m_search
public Any m_search(Context context,
Any element,
Any comparator_)
m_repeat
public Any m_repeat(int count)
m_count
public Any m_count(Any element)
m_push
public Any m_push(Any element,
Any[] parameters)
m_pop
public Any m_pop(Any index_)
m_unshift
public Any m_unshift(Any element,
Any[] parameters)
m_shift
public Any m_shift()
m_first
public Any m_first(Any index_)
m_last
public Any m_last(Any index_)
m_join
public Any m_join(java.lang.String clue)
m_get
public Any m_get(Any[] parameters)
m_set
public Any m_set(Context context,
Any[] parameters)
m_grep
public Any m_grep(Context context,
Any pattern_)