railo.runtime.type
Class CastableArray

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by railo.runtime.type.util.ArraySupport
              extended by railo.runtime.type.ArrayImpl
                  extended by railo.runtime.type.CastableArray
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, Dumpable, Castable, Array, ForEachIteratorable, Iteratorable, Objects, Sizeable

public final class CastableArray
extends ArrayImpl

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Field Summary
 
Fields inherited from class railo.runtime.type.util.ArraySupport
TYPE_BOOLEAN, TYPE_BYTE, TYPE_CHARACTER, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_OBJECT, TYPE_SHORT, TYPE_STRING
 
Constructor Summary
CastableArray()
          Constructor of the class generates as string list of the array
CastableArray(Object value)
           
 
Method Summary
 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
 int compareTo(boolean b)
           
 int compareTo(DateTime dt)
           
 int compareTo(double d)
           
 int compareTo(String str)
           
 Collection duplicate(boolean deepCopy)
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
 
Methods inherited from class railo.runtime.type.ArrayImpl
_append, append, appendEL, clear, entryIterator, get, get, get, get, get, getDimension, getE, insert, intKeys, iterator, keyIterator, keys, keysAsStringIterator, prepend, remove, removeE, removeEL, removeEL, resize, set, set, setE, setEL, setEL, setEL, size, sizeOf, sort, toArray, toPlain
 
Methods inherited from class railo.runtime.type.util.ArraySupport
add, addAll, call, callWithNamedValues, clone, containsKey, containsKey, containsKey, equals, get, get, get, getIterator, hashCode, remove, remove, removeAll, retainAll, set, set, setEL, sort, toArray, toList, toString, valueIterator
 
Methods inherited from class java.util.AbstractList
add, addAll, indexOf, lastIndexOf, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, contains, containsAll, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, subList
 

Constructor Detail

CastableArray

public CastableArray()
Constructor of the class generates as string list of the array


CastableArray

public CastableArray(Object value)
Method Detail

duplicate

public Collection duplicate(boolean deepCopy)
Overrides:
duplicate in class ArrayImpl

castToBooleanValue

public boolean castToBooleanValue()
                           throws PageException
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBooleanValue in interface Castable
Overrides:
castToBooleanValue in class ArraySupport
Returns:
boolean Value representation of the Object
Throws:
PageException

castToBoolean

public Boolean castToBoolean(Boolean defaultValue)
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBoolean in interface Castable
Overrides:
castToBoolean in class ArraySupport
Returns:
boolean Value representation of the Object

castToDateTime

public DateTime castToDateTime()
                        throws PageException
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Overrides:
castToDateTime in class ArraySupport
Returns:
date time representation of the Object
Throws:
PageException

castToDateTime

public DateTime castToDateTime(DateTime defaultValue)
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Overrides:
castToDateTime in class ArraySupport
Parameters:
defaultValue - returned when it is not possible to cast to a dateTime object
Returns:
date time representation of the Object

castToDoubleValue

public double castToDoubleValue()
                         throws PageException
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Overrides:
castToDoubleValue in class ArraySupport
Returns:
double Value representation of the Object
Throws:
PageException

castToDoubleValue

public double castToDoubleValue(double defaultValue)
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Overrides:
castToDoubleValue in class ArraySupport
Returns:
double Value representation of the Object

castToString

public String castToString()
                    throws PageException
Description copied from interface: Castable
cast the castable value to a string, other than the Method toString, this Method can throw a Exception

Specified by:
castToString in interface Castable
Overrides:
castToString in class ArraySupport
Returns:
String representation of the Object
Throws:
PageException

castToString

public String castToString(String defaultValue)
Description copied from interface: Castable
cast the castable value to a string, return the default value, when the method is not castable

Specified by:
castToString in interface Castable
Overrides:
castToString in class ArraySupport
Returns:
String representation of the Object

compareTo

public int compareTo(boolean b)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class ArraySupport
Throws:
PageException

compareTo

public int compareTo(DateTime dt)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class ArraySupport
Throws:
PageException

compareTo

public int compareTo(double d)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class ArraySupport
Throws:
PageException

compareTo

public int compareTo(String str)
              throws PageException
Specified by:
compareTo in interface Castable
Overrides:
compareTo in class ArraySupport
Throws:
PageException

toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties dp)
Description copied from interface: Dumpable
method to print out information to a object as HTML

Specified by:
toDumpData in interface Dumpable
Overrides:
toDumpData in class ArrayImpl
Returns:
return array as ArrayList


Copyright © 2012 Railo