public abstract class StructSupport extends Object implements Map, Struct, Sizeable
Collection.Key
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, TYPE_SYNC, TYPE_WEAKED
Constructor and Description |
---|
StructSupport() |
Modifier and Type | Method and Description |
---|---|
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
|
Object |
clone() |
int |
compareTo(boolean b) |
int |
compareTo(DateTime dt) |
int |
compareTo(double d) |
int |
compareTo(String str) |
boolean |
containsKey(Object key) |
boolean |
containsKey(String key)
contains this key
|
boolean |
containsValue(Object value) |
Set |
entrySet() |
boolean |
equals(Object obj) |
Object |
get(Object key) |
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
|
Iterator<String> |
getIterator() |
static ExpressionException |
invalidKey(Config config,
Struct sct,
Collection.Key key)
throw exception for invalid key
|
boolean |
isEmpty() |
Iterator<String> |
keysAsStringIterator() |
Set |
keySet() |
Object |
put(Object key,
Object value) |
void |
putAll(Map t) |
Object |
remove(Object key) |
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 |
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
|
long |
sizeOf()
return the size of the object
|
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties properties)
method to print out information to a object as HTML
|
String |
toString() |
Collection |
values() |
getClass, hashCode, notify, notifyAll, wait, wait, wait
clear, containsKey, duplicate, get, get, keys, remove, removeEL, set, setEL, size
entryIterator, keyIterator, valueIterator
public StructSupport()
public static ExpressionException invalidKey(Config config, Struct sct, Collection.Key key)
key
- Invalid keypublic long sizeOf()
Sizeable
public final Object clone()
clone
in interface Collection
clone
in class Object
public final boolean containsKey(Object key)
containsKey
in interface Map
public final boolean containsKey(String key)
Collection
containsKey
in interface Collection
public final Object get(String key, Object defaultValue)
Collection
get
in interface Collection
key
- key of the value to getpublic final Object get(String key) throws PageException
Collection
get
in interface Collection
key
- key of the value to getPageException
public final Object set(String key, Object value) throws PageException
Collection
set
in interface Collection
key
- key of the new valuevalue
- value to setPageException
public final Object setEL(String key, Object value)
Collection
setEL
in interface Collection
key
- key of the value to getvalue
- value to setpublic DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties)
Dumpable
toDumpData
in interface Dumpable
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 String castToString() throws PageException
Castable
castToString
in interface Castable
PageException
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
public 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 Collection values()
public boolean containsValue(Object value)
containsValue
in interface Map
public Iterator<String> keysAsStringIterator()
keysAsStringIterator
in interface Iteratorable
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<String> getIterator()
getIterator
in interface ForEachIteratorable
Copyright © 2015 Lucee