railo.runtime.type
Interface Array

All Superinterfaces:
Castable, java.lang.Cloneable, Collection, Dumpable, Iteratorable, java.io.Serializable
All Known Subinterfaces:
Argument

public interface Array
extends Collection, java.lang.Cloneable


Nested Class Summary
 
Nested classes inherited from class railo.runtime.type.Collection
Collection.Key
 
Method Summary
 java.lang.Object append(java.lang.Object o)
          append a new value to the end of the array
 java.lang.Object appendEL(java.lang.Object o)
           
 boolean containsKey(int key)
          contains this key
 java.lang.Object get(int key, java.lang.Object defaultValue)
          return object a given position, key can only be a integer from 1 to array len
 int getDimension()
          return dimension of the array
 java.lang.Object getE(int key)
          return object a given position, key can only be a integer from 1 to array len
 boolean insert(int key, java.lang.Object value)
          insert a value add defined position
 int[] intKeys()
           
 java.lang.Object prepend(java.lang.Object o)
          add a new value to the begin of the array
 java.lang.Object removeE(int key)
          removes a value ad defined key
 java.lang.Object removeEL(int key)
          removes a value ad defined key
 void resize(int to)
          resize array to defined size
 java.lang.Object setE(int key, java.lang.Object value)
          set value at defined position
 java.lang.Object setEL(int key, java.lang.Object value)
          set value at defined position, on error return null
 void sort(java.lang.String sortType, java.lang.String sortOrder)
          sort values of a array
 java.lang.Object[] toArray()
           
 java.util.List toList()
           
 
Methods inherited from interface railo.runtime.type.Collection
clear, clone, containsKey, containsKey, duplicate, get, get, get, get, keys, keysAsString, remove, removeEL, set, set, setEL, setEL, size
 
Methods inherited from interface railo.runtime.dump.Dumpable
toDumpData
 
Methods inherited from interface railo.runtime.type.Iteratorable
iterator, keyIterator
 
Methods inherited from interface railo.runtime.op.Castable
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo
 

Method Detail

getDimension

public int getDimension()
return dimension of the array

Returns:
dimension of the array

get

public java.lang.Object get(int key,
                            java.lang.Object defaultValue)
return object a given position, key can only be a integer from 1 to array len

Parameters:
key - key as integer
Returns:
value at key position

getE

public java.lang.Object getE(int key)
                      throws PageException
return object a given position, key can only be a integer from 1 to array len

Parameters:
key - key as integer
Returns:
value at key position
Throws:
PageException

setEL

public java.lang.Object setEL(int key,
                              java.lang.Object value)
set value at defined position, on error return null

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

setE

public java.lang.Object setE(int key,
                             java.lang.Object value)
                      throws PageException
set value at defined position

Parameters:
key -
value -
Returns:
defined value
Throws:
PageException

intKeys

public int[] intKeys()
Returns:
return all array keys as int

insert

public boolean insert(int key,
                      java.lang.Object value)
               throws PageException
insert a value add defined position

Parameters:
key - position to insert
value - value to insert
Returns:
has done or not
Throws:
PageException

append

public java.lang.Object append(java.lang.Object o)
                        throws PageException
append a new value to the end of the array

Parameters:
o - value to insert
Returns:
inserted value
Throws:
PageException

appendEL

public java.lang.Object appendEL(java.lang.Object o)

prepend

public java.lang.Object prepend(java.lang.Object o)
                         throws PageException
add a new value to the begin of the array

Parameters:
o - value to insert
Returns:
inserted value
Throws:
PageException

resize

public void resize(int to)
            throws PageException
resize array to defined size

Parameters:
to - new minimum size of the array
Throws:
PageException

sort

public void sort(java.lang.String sortType,
                 java.lang.String sortOrder)
          throws PageException
sort values of a array

Parameters:
sortType - search type (text,textnocase,numeric)
sortOrder - (asc,desc)
Throws:
PageException

toArray

public java.lang.Object[] toArray()
Returns:
return arra as native (Java) Object Array

toList

public java.util.List toList()
Returns:
return array as ArrayList

removeE

public java.lang.Object removeE(int key)
                         throws PageException
removes a value ad defined key

Parameters:
key - key to remove
Returns:
retuns if value is removed or not
Throws:
PageException

removeEL

public java.lang.Object removeEL(int key)
removes a value ad defined key

Parameters:
key - key to remove
Returns:
retuns if value is removed or not

containsKey

public boolean containsKey(int key)
contains this key

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