railo.runtime.type
Interface Collection

All Superinterfaces:
Castable, Cloneable, Dumpable, Iteratorable, Serializable
All Known Subinterfaces:
Application, Argument, ArgumentPro, Array, Caller, CGI, Client, ClientPlus, Cluster, CollectionPlus, Component, ComponentAccess, ComponentPro, ComponentScope, Cookie, Form, Local, LocalPro, MemoryScope, Query, QueryColumn, QueryColumnPro, QueryPro, QueryTable, Request, Scope, Server, Session, SessionPlus, SharedScope, StorageScope, Struct, Threads, Undefined, URL, URLForm, Variables, XMLStruct
All Known Implementing Classes:
ApplicationImpl, ArgumentImpl, ArgumentThreadImpl, ArrayImpl, ArrayImplNS, ArraySupport, CallerImpl, CastableArray, CastableStruct, CatchBlock, CFCProxy, CGIImpl, ClientCache, ClientCookie, ClientDatasource, ClientFile, ClientMemory, ClusterNotSupported, ClusterWrap, CollectionStruct, ComponentAccessProxy, ComponentImpl, ComponentProProxy, ComponentScopeShadow, ComponentScopeThis, ComponentWrap, CookieImpl, DebugQueryColumn, DoubleStruct, FeedStruct, FileStreamWrapper, FileStreamWrapperRead, FileStreamWrapperReadBinary, FileStreamWrapperReadWrite, FileStreamWrapperWrite, FormImpl, HttpSessionBindingListenerStruct, Image, JSession, ListAsArray, LocalImpl, LocalNotSupportedScope, MapAsStruct, ObjectStruct, PDFDocument, QueryCacheQuery, QueryCacheQueryColumn, QueryColumnImpl, QueryColumnRef, QueryImpl, ReadOnlyStruct, RequestImpl, ScopeSupport, ServerImpl, SessionCache, SessionCookie, SessionDatasource, SessionFile, SessionMemory, SimpleQuery, SimpleQueryColumn, StorageScopeCache, StorageScopeCookie, StorageScopeDatasource, StorageScopeFile, StorageScopeImpl, StorageScopeMemory, StructImpl, StructImplKey, StructImplString, StructSupport, SuperComponent, SVArray, SVStruct, ThreadsImpl, TOArray, TOQuery, TOStruct, UndefinedImpl, UrlFormImpl, URLImpl, VariablesAsSession, VariablesImpl, XMLAttributes, XMLAttrStruct, XMLCDATASectionStruct, XMLDocumentStruct, XMLElementStruct, XMLMultiElementArray, XMLMultiElementStruct, XMLNodeList, XMLNodeStruct, XMLTextStruct

public interface Collection
extends Dumpable, Iteratorable, Cloneable, Serializable, Castable

interface collection, used for all collection types of railo (array, struct, query)


Nested Class Summary
static interface Collection.Key
           
 
Method Summary
 void clear()
          clears the collection
 Object clone()
           
 boolean containsKey(Collection.Key key)
          contains this key
 boolean containsKey(String key)
          Deprecated. use instead containsKey(railo.runtime.type.Collection.Key)
 Collection duplicate(boolean deepCopy)
           
 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
 Object get(String key)
          Deprecated. use instead get(railo.runtime.type.Collection.Key)
 Object get(String key, Object defaultValue)
          Deprecated. use instead get(railo.runtime.type.Collection.Key, Object)
 Collection.Key[] keys()
           
 String[] keysAsString()
          Deprecated. use instead keys()
 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 set(String key, Object value)
          Deprecated. use instead set(railo.runtime.type.Collection.Key, Object)
 Object setEL(Collection.Key key, Object value)
          sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
 Object setEL(String key, Object value)
          Deprecated. use instead setEL(railo.runtime.type.Collection.Key, Object)
 int size()
           
 
Methods inherited from interface railo.runtime.dump.Dumpable
toDumpData
 
Methods inherited from interface railo.runtime.type.Iteratorable
iterator, keyIterator, valueIterator
 
Methods inherited from interface railo.runtime.op.Castable
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo
 

Method Detail

size

int size()
Returns:
the size of the collection

keys

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

keysAsString

String[] keysAsString()
Deprecated. use instead keys()

Returns:
returns a string array of all keys in the collection

remove

Object remove(Collection.Key key)
              throws PageException
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

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

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

clear

void clear()
clears the collection


get

Object get(String key)
           throws PageException
Deprecated. use instead get(railo.runtime.type.Collection.Key)

return a value from the collection

Parameters:
key - key of the value to get
Returns:
value on key position
Throws:
PageException

get

Object get(Collection.Key key)
           throws PageException
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

get

Object get(String key,
           Object defaultValue)
Deprecated. use instead get(railo.runtime.type.Collection.Key, Object)

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

get

Object get(Collection.Key key,
           Object defaultValue)
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

set

Object set(String key,
           Object value)
           throws PageException
Deprecated. use instead set(railo.runtime.type.Collection.Key, Object)

sets a value to the collection

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

set

Object set(Collection.Key key,
           Object value)
           throws PageException
sets a value to the collection

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

setEL

Object setEL(String key,
             Object value)
Deprecated. use instead setEL(railo.runtime.type.Collection.Key, Object)

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

setEL

Object setEL(Collection.Key key,
             Object value)
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

clone

Object clone()
Returns:
this object cloned

duplicate

Collection duplicate(boolean deepCopy)

containsKey

boolean containsKey(String key)
Deprecated. use instead containsKey(railo.runtime.type.Collection.Key)

contains this key

Parameters:
key -
Returns:
returns if collection has a key with given name

containsKey

boolean containsKey(Collection.Key key)
contains this key

Parameters:
key -
Returns:
returns if collection has a key with given name


Copyright © 2012 Railo