public final class CollectionStruct extends StructSupport implements ObjectWrap, Struct
Collection.Key
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, TYPE_SYNC, TYPE_WEAKED
Constructor and Description |
---|
CollectionStruct(Collection coll) |
Modifier and Type | Method and Description |
---|---|
boolean |
castToBooleanValue()
cast the castable value to a boolean value
|
DateTime |
castToDateTime()
cast the castable value to a date time object
|
double |
castToDoubleValue()
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
|
void |
clear()
clears the collection
|
int |
compareTo(boolean b) |
int |
compareTo(DateTime dt) |
int |
compareTo(double d) |
int |
compareTo(String str) |
boolean |
containsKey(Collection.Key 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
|
Collection |
getCollection() |
Object |
getEmbededObject()
returns embeded Object
|
Object |
getEmbededObject(Object defaultValue)
returns embeded Object EL
|
Iterator<Collection.Key> |
keyIterator() |
Collection.Key[] |
keys() |
Iterator<String> |
keysAsStringIterator() |
Object |
remove(Collection.Key key)
removes value from collection and return it when it exists, otherwise throws a exception
|
Object |
removeEL(Collection.Key key)
removes value from collection and return it when it exists, otherwise returns null
|
Object |
set(Collection.Key key,
Object value)
sets a value to the collection
|
Object |
setEL(Collection.Key key,
Object value)
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
|
int |
size() |
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties properties)
method to print out information to a object as HTML
|
Iterator<Object> |
valueIterator() |
call, callWithNamedValues, castToBoolean, castToDateTime, castToDoubleValue, castToString, clone, containsKey, containsKey, containsValue, entrySet, equals, get, get, get, get, get, getIterator, invalidKey, isEmpty, keySet, put, putAll, remove, set, set, setEL, setEL, sizeOf, toString, values
getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, containsKey, get, get, set, setEL
getIterator
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, values
call, callWithNamedValues, get, get, set, setEL
castToBoolean, castToDateTime, castToDoubleValue, castToString
public CollectionStruct(Collection coll)
public void clear()
Collection
clear
in interface Map
clear
in interface Collection
public boolean containsKey(Collection.Key key)
Collection
containsKey
in interface Collection
public Collection duplicate(boolean deepCopy)
duplicate
in interface Collection
public Object get(Collection.Key key) throws PageException
Collection
get
in interface Collection
key
- key of the value to get must be lower casePageException
public Object get(Collection.Key key, Object defaultValue)
Collection
get
in interface Collection
key
- key of the value to getpublic Collection.Key[] keys()
keys
in interface Collection
public Object remove(Collection.Key key) throws PageException
Collection
remove
in interface Collection
key
- key of the collectionPageException
public Object removeEL(Collection.Key key)
Collection
removeEL
in interface Collection
key
- key of the collectionpublic Object set(Collection.Key key, Object value) throws PageException
Collection
set
in interface Collection
key
- key of the new valuevalue
- value to setPageException
public Object setEL(Collection.Key key, Object value)
Collection
setEL
in interface Collection
key
- key of the value to getvalue
- value to setpublic int size()
size
in interface Map
size
in interface Collection
public Iterator<Collection.Key> keyIterator()
keyIterator
in interface Iteratorable
public Iterator<String> keysAsStringIterator()
keysAsStringIterator
in interface Iteratorable
keysAsStringIterator
in class StructSupport
public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
entryIterator
in interface Iteratorable
public Iterator<Object> valueIterator()
valueIterator
in interface Iteratorable
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties)
Dumpable
toDumpData
in interface Dumpable
toDumpData
in class StructSupport
public boolean castToBooleanValue() throws PageException
Castable
castToBooleanValue
in interface Castable
castToBooleanValue
in class StructSupport
PageException
public double castToDoubleValue() throws PageException
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
PageException
public DateTime castToDateTime() throws PageException
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
PageException
public String castToString() throws PageException
Castable
castToString
in interface Castable
castToString
in class StructSupport
PageException
public int compareTo(boolean b) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public int compareTo(double d) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public int compareTo(String str) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public Object getEmbededObject(Object defaultValue)
ObjectWrap
getEmbededObject
in interface ObjectWrap
public Object getEmbededObject() throws PageException
ObjectWrap
getEmbededObject
in interface ObjectWrap
PageException
public Collection getCollection()
Copyright © 2015 Lucee