public class StructImpl extends StructSupport
Collection.Key
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_UNDEFINED |
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, TYPE_SYNC, TYPE_WEAKED
Constructor and Description |
---|
StructImpl()
default constructor
|
StructImpl(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.
|
StructImpl(int type,
int initialCapacity)
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 |
---|---|
void |
clear()
clears the collection
|
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() |
boolean |
equals(Object obj) |
Object |
g(Collection.Key key) |
Object |
g(Collection.Key key,
Object defaultValue) |
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
|
int |
getType() |
int |
hashCode() |
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 |
remove(Collection.Key key,
Object defaultValue) |
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() |
Iterator<Object> |
valueIterator() |
Collection<Object> |
values() |
call, callWithNamedValues, castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, clone, compareTo, compareTo, compareTo, compareTo, containsKey, containsKey, entrySet, get, get, get, get, get, getIterator, invalidKey, isEmpty, keySet, put, putAll, remove, set, set, setEL, setEL, sizeOf, toDumpData, toString
public static final int TYPE_UNDEFINED
public StructImpl()
public StructImpl(int type)
type
- public StructImpl(int type, int initialCapacity)
type
- initialCapacity
- initial capacity - MUST be a power of two.public int getType()
public Object get(Collection.Key key, Object defaultValue)
Collection
key
- key of the value to getpublic Object g(Collection.Key key, Object defaultValue)
public Object g(Collection.Key key) throws PageException
PageException
public Object get(Collection.Key key) throws PageException
Collection
key
- key of the value to get must be lower casePageException
public Object set(Collection.Key key, Object value) throws PageException
Collection
key
- key of the new valuevalue
- value to setPageException
public Object setEL(Collection.Key key, Object value)
Collection
key
- key of the value to getvalue
- value to setpublic int size()
public 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 remove(Collection.Key key, Object defaultValue)
public void clear()
Collection
public Collection duplicate(boolean deepCopy)
public Iterator<Collection.Key> keyIterator()
public Iterator<String> keysAsStringIterator()
keysAsStringIterator
in interface Iteratorable
keysAsStringIterator
in class StructSupport
public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
public Iterator<Object> valueIterator()
public boolean containsKey(Collection.Key key)
Collection
public boolean containsValue(Object value)
containsValue
in interface Map
containsValue
in class StructSupport
public Collection<Object> values()
values
in interface Map
values
in class StructSupport
public int hashCode()
Copyright © 2015 Lucee