railo.runtime.type
Class StructImpl

java.lang.Object
  extended by railo.runtime.type.util.StructSupport
      extended by railo.runtime.type.StructImpl
All Implemented Interfaces:
Serializable, Cloneable, Map, Dumpable, Castable, Collection, ForEachIteratorable, Iteratorable, Objects, Sizeable, Struct
Direct Known Subclasses:
CastableStruct, CatchBlockImpl, DoubleStruct, FeedStruct, HttpSessionBindingListenerStruct, ReadOnlyStruct, ScopeSupport, StructImplString

public class StructImpl
extends StructSupport

CFML data type struct

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface railo.runtime.type.Struct
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, TYPE_SYNC, TYPE_WEAKED
 
Constructor Summary
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.
 
Method Summary
 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 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 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()
           
 
Methods inherited from class railo.runtime.type.util.StructSupport
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
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StructImpl

public StructImpl()
default constructor


StructImpl

public 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. It can be used to produce a copy of a map that has the same order as the original

Parameters:
doubleLinked -
Method Detail

get

public Object get(Collection.Key key,
                  Object defaultValue)
Description copied from interface: Collection
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null

Parameters:
key - key of the value to get
Returns:
value on key position or null

g

public Object g(Collection.Key key,
                Object defaultValue)

g

public Object g(Collection.Key key)
         throws PageException
Throws:
PageException

get

public Object get(Collection.Key key)
           throws PageException
Description copied from interface: Collection
return a value from the collection

Parameters:
key - key of the value to get must be lower case
Returns:
value on key position
Throws:
PageException

set

public Object set(Collection.Key key,
                  Object value)
           throws PageException
Description copied from interface: Collection
sets a value to the collection

Parameters:
key - key of the new value
value - value to set
Returns:
value setted
Throws:
PageException

setEL

public Object setEL(Collection.Key key,
                    Object value)
Description copied from interface: Collection
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null

Parameters:
key - key of the value to get
value - value to set
Returns:
value on key position or null

size

public int size()
Returns:
the size of the collection

keys

public Collection.Key[] keys()
Returns:
returns a string array of all keys in the collection

remove

public Object remove(Collection.Key key)
              throws PageException
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise throws a exception

Parameters:
key - key of the collection
Returns:
removed Object
Throws:
PageException

removeEL

public Object removeEL(Collection.Key key)
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise returns null

Parameters:
key - key of the collection
Returns:
removed Object

clear

public void clear()
Description copied from interface: Collection
clears the collection


duplicate

public Collection duplicate(boolean deepCopy)

copy

public static void copy(Struct src,
                        Struct trg,
                        boolean deepCopy)

keyIterator

public Iterator<Collection.Key> keyIterator()
Returns:
return a Iterator for Keys as Collection.Keys

keysAsStringIterator

public Iterator<String> keysAsStringIterator()
Specified by:
keysAsStringIterator in interface Iteratorable
Overrides:
keysAsStringIterator in class StructSupport
Returns:
return a Iterator for Keys as String

entryIterator

public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()

valueIterator

public Iterator<Object> valueIterator()
Returns:
return a Iterator for Values

containsKey

public boolean containsKey(Collection.Key key)
Description copied from interface: Collection
contains this key

Returns:
returns if collection has a key with given name

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map
Overrides:
containsValue in class StructSupport

values

public Collection<Object> values()
Specified by:
values in interface Map
Overrides:
values in class StructSupport

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class StructSupport

equals

public boolean equals(Object obj)
Specified by:
equals in interface Map
Overrides:
equals in class StructSupport


Copyright © 2012 Railo