public final class StructImplKey extends StructSupport implements Struct
Collection.Key
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_LINKED |
static int |
TYPE_REGULAR |
static int |
TYPE_SYNC |
static int |
TYPE_WEAKED |
Constructor and Description |
---|
StructImplKey()
default constructor
|
StructImplKey(int type)
This implementation spares its clients from the unspecified,
generally chaotic ordering provided by normally Struct ,
without incurring the increased cost associated with TreeMap.
|
Modifier and Type | Method and Description |
---|---|
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
|
int |
compareTo(boolean b) |
int |
compareTo(DateTime dt) |
int |
compareTo(double d) |
int |
compareTo(String str) |
boolean |
containsKey(Collection.Key key)
contains this key
|
boolean |
containsValue(Object value) |
static void |
copy(Struct src,
Struct trg,
boolean deepCopy) |
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
|
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 dp)
method to print out information to a object as HTML
|
Iterator |
valueIterator() |
Collection |
values() |
call, callWithNamedValues, clone, containsKey, containsKey, entrySet, equals, get, get, get, get, get, getIterator, invalidKey, isEmpty, keySet, put, putAll, remove, set, set, setEL, setEL, sizeOf, toString
getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, containsKey, get, get, set, setEL
getIterator
public static final int TYPE_WEAKED
public static final int TYPE_LINKED
public static final int TYPE_SYNC
public static final int TYPE_REGULAR
public StructImplKey()
public StructImplKey(int type)
doubleLinked
- public Object get(Collection.Key key, Object defaultValue)
Collection
get
in interface Collection
key
- key of the value to getCollection.get(lucee.runtime.type.Collection.Key, java.lang.Object)
public Object get(Collection.Key key) throws PageException
Collection
get
in interface Collection
key
- key of the value to get must be lower casePageException
Collection.get(lucee.runtime.type.Collection.Key)
public Object set(Collection.Key key, Object value) throws PageException
Collection
set
in interface Collection
key
- key of the new valuevalue
- value to setPageException
Collection.set(lucee.runtime.type.Collection.Key, java.lang.Object)
public Object setEL(Collection.Key key, Object value)
Collection
setEL
in interface Collection
key
- key of the value to getvalue
- value to setCollection.setEL(lucee.runtime.type.Collection.Key, java.lang.Object)
public int size()
size
in interface Map
size
in interface Collection
Collection.size()
public 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
Collection.remove(lucee.runtime.type.Collection.Key)
public Object removeEL(Collection.Key key)
Collection
removeEL
in interface Collection
key
- key of the collectionCollection.removeEL(lucee.runtime.type.Collection.Key)
public void clear()
Collection
clear
in interface Map
clear
in interface Collection
Collection.clear()
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
Dumpable
toDumpData
in interface Dumpable
toDumpData
in class StructSupport
lucee.runtime.dump.Dumpable#toDumpData(lucee.runtime.PageContext, int)
public Collection duplicate(boolean deepCopy)
duplicate
in interface Collection
Collection.duplicate(boolean)
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 valueIterator()
valueIterator
in interface Iteratorable
lucee.runtime.type.Iteratorable#iterator()
public boolean containsKey(Collection.Key key)
Collection
containsKey
in interface Collection
lucee.runtime.type.Collection#_contains(java.lang.String)
public String castToString() throws ExpressionException
Castable
castToString
in interface Castable
castToString
in class StructSupport
ExpressionException
Castable.castToString()
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
castToString
in class StructSupport
StructSupport.castToString(java.lang.String)
public boolean castToBooleanValue() throws ExpressionException
Castable
castToBooleanValue
in interface Castable
castToBooleanValue
in class StructSupport
ExpressionException
Castable.castToBooleanValue()
public Boolean castToBoolean(Boolean defaultValue)
Castable
castToBoolean
in interface Castable
castToBoolean
in class StructSupport
Castable.castToBoolean(java.lang.Boolean)
public double castToDoubleValue() throws ExpressionException
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
ExpressionException
Castable.castToDoubleValue()
public double castToDoubleValue(double defaultValue)
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
Castable.castToDoubleValue(double)
public DateTime castToDateTime() throws ExpressionException
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
ExpressionException
Castable.castToDateTime()
public DateTime castToDateTime(DateTime defaultValue)
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
defaultValue
- returned when it is not possible to cast to a dateTime objectCastable.castToDateTime(lucee.runtime.type.dt.DateTime)
public int compareTo(boolean b) throws ExpressionException
compareTo
in interface Castable
compareTo
in class StructSupport
ExpressionException
lucee.runtime.op.Castable#compare(boolean)
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
Castable.compareTo(lucee.runtime.type.dt.DateTime)
public int compareTo(double d) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
Castable.compareTo(double)
public int compareTo(String str) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
Castable.compareTo(java.lang.String)
public boolean containsValue(Object value)
containsValue
in interface Map
containsValue
in class StructSupport
public Collection values()
values
in interface Map
values
in class StructSupport
Copyright © 2015 Lucee