public class ListAsArray extends Object implements Array, List, Sizeable
Collection.Key
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Object element) |
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
Object |
append(Object o)
append a new value to the end of the array
|
Object |
appendEL(Object o) |
Object |
call(PageContext pc,
Collection.Key methodName,
Object[] args)
calls a method of the object
|
Object |
callWithNamedValues(PageContext pc,
Collection.Key methodName,
Struct args)
call a method of the Object with named arguments
|
Boolean |
castToBoolean(Boolean defaultValue)
cast the castable value to a boolean value
|
boolean |
castToBooleanValue()
cast the castable value to a boolean value
|
DateTime |
castToDateTime()
cast the castable value to a date time object
|
DateTime |
castToDateTime(DateTime defaultValue)
cast the castable value to a date time object
|
double |
castToDoubleValue()
cast the castable value to a double value
|
double |
castToDoubleValue(double defaultValue)
cast the castable value to a double value
|
String |
castToString()
cast the castable value to a string, other than the Method toString, this Method can throw a Exception
|
String |
castToString(String defaultValue)
cast the castable value to a string, return the default value, when the method is not castable
|
void |
clear()
clears the collection
|
Object |
clone() |
int |
compareTo(boolean b) |
int |
compareTo(DateTime dt) |
int |
compareTo(double d) |
int |
compareTo(String str) |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
boolean |
containsKey(Collection.Key key)
contains this key
|
boolean |
containsKey(int index)
contains this key
|
boolean |
containsKey(String key)
contains this key
|
Collection |
duplicate(boolean deepCopy) |
Iterator<Map.Entry<Collection.Key,Object>> |
entryIterator() |
Object |
get(Collection.Key key)
return a value from the collection
|
Object |
get(Collection.Key key,
Object defaultValue)
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
|
Object |
get(int index) |
Object |
get(int key,
Object defaultValue)
return object a given position, key can only be a integer from 1 to array len
|
Object |
get(PageContext pc,
Collection.Key key)
return property or getter of the ContextCollection
|
Object |
get(PageContext pc,
Collection.Key key,
Object defaultValue)
return property
|
Object |
get(String key)
return a value from the collection
|
Object |
get(String key,
Object defaultValue)
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
|
int |
getDimension()
return dimension of the array
|
Object |
getE(int key)
return object a given position, key can only be a integer from 1 to array len
|
Iterator<Object> |
getIterator() |
int |
indexOf(Object o) |
boolean |
insert(int key,
Object value)
insert a value add defined position
|
int[] |
intKeys() |
boolean |
isEmpty() |
Iterator |
iterator() |
Iterator<Collection.Key> |
keyIterator() |
Collection.Key[] |
keys() |
Iterator<String> |
keysAsStringIterator() |
int |
lastIndexOf(Object o) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index) |
Object |
prepend(Object o)
add a new value to the begin of the array
|
Object |
remove(Collection.Key key)
removes value from collection and return it when it exists, otherwise throws a exception
|
Object |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
Object |
removeE(int key)
removes a value ad defined key
|
Object |
removeEL(Collection.Key key)
removes value from collection and return it when it exists, otherwise returns null
|
Object |
removeEL(int key)
removes a value ad defined key
|
void |
resize(int to)
resize array to defined size
|
boolean |
retainAll(Collection c) |
Object |
set(Collection.Key key,
Object value)
sets a value to the collection
|
Object |
set(int index,
Object element) |
Object |
set(PageContext pc,
Collection.Key propertyName,
Object value)
sets a property (Data Member) value of the object
|
Object |
set(String key,
Object value)
sets a value to the collection
|
Object |
setE(int key,
Object value)
set value at defined position
|
Object |
setEL(Collection.Key key,
Object value)
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
|
Object |
setEL(int key,
Object value)
set value at defined position, on error return null
|
Object |
setEL(PageContext pc,
Collection.Key propertyName,
Object value)
sets a property (Data Member) value of the object
|
Object |
setEL(String key,
Object value)
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
|
int |
size() |
long |
sizeOf()
return the size of the object
|
void |
sort(Comparator comp) |
void |
sort(String sortType,
String sortOrder)
sort values of a array
|
List |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
static Array |
toArray(List list) |
Object[] |
toArray(Object[] a) |
ArrayList |
toArrayList() |
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties dp)
method to print out information to a object as HTML
|
List |
toList() |
String |
toString() |
Iterator |
valueIterator() |
public Object append(Object o) throws PageException
Array
append
in interface Array
o
- value to insertPageException
public boolean containsKey(int index)
Array
containsKey
in interface Array
public Object get(int key, Object defaultValue)
Array
public Object getE(int key) throws PageException
Array
getE
in interface Array
key
- key as integerPageException
public int getDimension()
Array
getDimension
in interface Array
public boolean insert(int key, Object value) throws PageException
Array
insert
in interface Array
key
- position to insertvalue
- value to insertPageException
public int[] intKeys()
public Object prepend(Object o) throws PageException
Array
prepend
in interface Array
o
- value to insertPageException
public Object removeE(int key) throws PageException
Array
removeE
in interface Array
key
- key to removePageException
public Object removeEL(int key)
Array
public void resize(int to) throws PageException
Array
resize
in interface Array
to
- new minimum size of the arrayPageException
public Object setE(int key, Object value) throws PageException
Array
setE
in interface Array
PageException
public Object setEL(int key, Object value)
Array
public void sort(String sortType, String sortOrder) throws PageException
Array
sort
in interface Array
sortType
- search type (text,textnocase,numeric)sortOrder
- (asc,desc)PageException
public void sort(Comparator comp)
public ArrayList toArrayList()
public void clear()
Collection
clear
in interface Collection
clear
in interface List
public boolean containsKey(String key)
Collection
public boolean containsKey(Collection.Key key)
Collection
public Collection duplicate(boolean deepCopy)
public Object get(String key) throws PageException
Collection
key
- key of the value to getPageException
public Object get(Collection.Key key) throws PageException
Collection
key
- key of the value to get must be lower casePageException
public Object get(String key, Object defaultValue)
Collection
key
- key of the value to getpublic Object get(Collection.Key key, Object defaultValue)
Collection
key
- key of the value to getpublic Collection.Key[] keys()
public Object remove(Collection.Key key) throws PageException
Collection
key
- key of the collectionPageException
public Object removeEL(Collection.Key key)
Collection
key
- key of the collectionpublic Object set(String key, Object value) throws PageException
Collection
key
- key of the new valuevalue
- value to setPageException
public Object set(Collection.Key key, Object value) throws PageException
Collection
key
- key of the new valuevalue
- value to setPageException
public Object setEL(String key, Object value)
Collection
key
- key of the value to getvalue
- value to setpublic Object setEL(Collection.Key key, Object value)
Collection
key
- key of the value to getvalue
- value to setpublic int size()
size
in interface Collection
size
in interface List
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
Dumpable
toDumpData
in interface Dumpable
public Iterator<Collection.Key> keyIterator()
keyIterator
in interface Iteratorable
public Iterator<String> keysAsStringIterator()
keysAsStringIterator
in interface Iteratorable
public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
entryIterator
in interface Iteratorable
public String castToString() throws PageException
Castable
castToString
in interface Castable
PageException
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
public boolean castToBooleanValue() throws PageException
Castable
castToBooleanValue
in interface Castable
PageException
public Boolean castToBoolean(Boolean defaultValue)
Castable
castToBoolean
in interface Castable
public double castToDoubleValue() throws PageException
Castable
castToDoubleValue
in interface Castable
PageException
public double castToDoubleValue(double defaultValue)
Castable
castToDoubleValue
in interface Castable
public DateTime castToDateTime() throws PageException
Castable
castToDateTime
in interface Castable
PageException
public DateTime castToDateTime(DateTime defaultValue)
Castable
castToDateTime
in interface Castable
defaultValue
- returned when it is not possible to cast to a dateTime objectpublic int compareTo(boolean b) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(double d) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(String str) throws PageException
compareTo
in interface Castable
PageException
public boolean add(Object o)
add
in interface Collection
add
in interface List
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
public boolean addAll(int index, Collection c)
public boolean contains(Object o)
contains
in interface Collection
contains
in interface List
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface List
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
public int lastIndexOf(Object o)
lastIndexOf
in interface List
public ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index)
listIterator
in interface List
public boolean remove(Object o)
remove
in interface Collection
remove
in interface List
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
public Iterator valueIterator()
valueIterator
in interface Iteratorable
public long sizeOf()
Sizeable
public Object get(PageContext pc, Collection.Key key, Object defaultValue)
Objects
public Object get(PageContext pc, Collection.Key key) throws PageException
Objects
get
in interface Objects
pc
- PageContextkey
- Name of the PropertyPageException
public Object set(PageContext pc, Collection.Key propertyName, Object value) throws PageException
Objects
set
in interface Objects
propertyName
- property name to setvalue
- value to insertPageException
public Object setEL(PageContext pc, Collection.Key propertyName, Object value)
Objects
public Object call(PageContext pc, Collection.Key methodName, Object[] args) throws PageException
Objects
call
in interface Objects
methodName
- name of the method to callargs
- arguments to call method withPageException
public Object callWithNamedValues(PageContext pc, Collection.Key methodName, Struct args) throws PageException
Objects
callWithNamedValues
in interface Objects
pc
- PageContextmethodName
- name of the methodargs
- Named Arguments for the methodPageException
public Iterator<Object> getIterator()
getIterator
in interface ForEachIteratorable
Copyright © 2015 Lucee