railo.runtime.type
Class KeyImpl

java.lang.Object
  extended by railo.runtime.type.KeyImpl
All Implemented Interfaces:
Externalizable, Serializable, Comparable, Castable, Collection.Key, Sizeable
Direct Known Subclasses:
ArgumentIntKey

public class KeyImpl
extends Object
implements Collection.Key, Castable, Comparable, Sizeable, Externalizable

See Also:
Serialized Form

Field Summary
static Collection.Key ACCESS
           
static Collection.Key ACTION
           
static Collection.Key ARGUMENT_COLLECTION
           
static Collection.Key ARGUMENTS
           
static Collection.Key BODY
           
static Collection.Key CFID
           
static Collection.Key CFTOKEN
           
static Collection.Key COLUMN
           
static Collection.Key DATA
           
static Collection.Key DATA_SOURCE
           
static Collection.Key DEFAULT
           
static Collection.Key DESCRIPTION
           
static Collection.Key DETAIL
           
static Collection.Key DISPLAY_NAME
           
static Collection.Key ENTRY
           
static Collection.Key EXCEPTIONS
           
static Collection.Key FIELD_NAMES
           
static Collection.Key HINT
           
static Collection.Key ID
           
static Collection.Key KEY
           
static Collection.Key LABEL
           
static Collection.Key LINE
           
static Collection.Key LOCAL
           
static Collection.Key NAME
           
static Collection.Key NAME_UC
           
static Collection.Key OUTPUT
           
static Collection.Key OWNER
           
static Collection.Key PARAMETERS
           
static Collection.Key PATH
           
static Collection.Key REQUIRED
           
static Collection.Key RETURN_FORMAT
           
static Collection.Key RETURN_TYPE
           
static Collection.Key S3
           
static Collection.Key SERVER
           
static Collection.Key SIZE
           
static Collection.Key STATUS
           
static Collection.Key SUPER
           
static Collection.Key SUPER_UC
           
static Collection.Key TEMPLATE
           
static Collection.Key THIS
           
static Collection.Key THIS_UC
           
static Collection.Key THREAD
           
static Collection.Key TIME
           
static Collection.Key TITLE
           
static Collection.Key TOTAL
           
static Collection.Key TYPE
           
static Collection.Key URL
           
static Collection.Key VALUE
           
static Collection.Key VARIABLES
           
 
Constructor Summary
KeyImpl()
           
 
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
 char charAt(int index)
          return char at given position
 int compareTo(boolean b)
           
 int compareTo(DateTime dt)
           
 int compareTo(double d)
           
 int compareTo(Object o)
           
 int compareTo(String str)
           
 boolean equals(Object other)
           
 boolean equalsIgnoreCase(Collection.Key key)
          compare to object, ignore case of input
 int getId()
           
static Collection.Key getInstance(String key)
          used for static iniatisation of a key object (used by compiler)
 String getLowerString()
          return key as lower case String
 String getString()
          return key as String
 String getUpperString()
          return key as upper case String
 int hashCode()
           
static Collection.Key init(String key)
          for dynamic loading of key objects
static Collection.Key intern(String key)
           
 char lowerCharAt(int index)
          return lower case char a given position
 void readExternal(ObjectInput in)
           
 long sizeOf()
          return the size of the object
static Array toArray(Collection.Key[] keys)
           
static Collection.Key toKey(Object obj)
           
static Collection.Key toKey(Object obj, Collection.Key defaultValue)
           
static String toList(Collection.Key[] array, String delimeter)
           
static Array toLowerCaseArray(Collection.Key[] keys)
           
static String toLowerCaseList(Collection.Key[] array, String delimeter)
           
 String toString()
           
static Array toUpperCaseArray(Collection.Key[] keys)
           
static String toUpperCaseList(Collection.Key[] array, String delimeter)
           
 char upperCharAt(int index)
          return upper case char a given position
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTION

public static final Collection.Key ACTION

CFID

public static final Collection.Key CFID

CFTOKEN

public static final Collection.Key CFTOKEN

DETAIL

public static final Collection.Key DETAIL

ID

public static final Collection.Key ID

RETURN_FORMAT

public static final Collection.Key RETURN_FORMAT

NAME

public static final Collection.Key NAME

NAME_UC

public static final Collection.Key NAME_UC

DATA

public static final Collection.Key DATA

S3

public static final Collection.Key S3

SIZE

public static final Collection.Key SIZE

SUPER

public static final Collection.Key SUPER

SUPER_UC

public static final Collection.Key SUPER_UC

TEMPLATE

public static final Collection.Key TEMPLATE

THIS

public static final Collection.Key THIS

THIS_UC

public static final Collection.Key THIS_UC

TIME

public static final Collection.Key TIME

TYPE

public static final Collection.Key TYPE

HINT

public static final Collection.Key HINT

REQUIRED

public static final Collection.Key REQUIRED

DEFAULT

public static final Collection.Key DEFAULT

DATA_SOURCE

public static final Collection.Key DATA_SOURCE

ARGUMENT_COLLECTION

public static final Collection.Key ARGUMENT_COLLECTION

ACCESS

public static final Collection.Key ACCESS

OUTPUT

public static final Collection.Key OUTPUT

RETURN_TYPE

public static final Collection.Key RETURN_TYPE

DESCRIPTION

public static final Collection.Key DESCRIPTION

OWNER

public static final Collection.Key OWNER

DISPLAY_NAME

public static final Collection.Key DISPLAY_NAME

PARAMETERS

public static final Collection.Key PARAMETERS

VALUE

public static final Collection.Key VALUE

PATH

public static final Collection.Key PATH

ENTRY

public static final Collection.Key ENTRY

KEY

public static final Collection.Key KEY

LINE

public static final Collection.Key LINE

COLUMN

public static final Collection.Key COLUMN

ARGUMENTS

public static final Collection.Key ARGUMENTS

STATUS

public static final Collection.Key STATUS

THREAD

public static final Collection.Key THREAD

VARIABLES

public static final Collection.Key VARIABLES

FIELD_NAMES

public static final Collection.Key FIELD_NAMES

LOCAL

public static final Collection.Key LOCAL

SERVER

public static final Collection.Key SERVER

EXCEPTIONS

public static final Collection.Key EXCEPTIONS

BODY

public static final Collection.Key BODY

TITLE

public static final Collection.Key TITLE

URL

public static final Collection.Key URL

LABEL

public static final Collection.Key LABEL

TOTAL

public static final Collection.Key TOTAL
Constructor Detail

KeyImpl

public KeyImpl()
Method Detail

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

init

public static Collection.Key init(String key)
for dynamic loading of key objects

Parameters:
string -
Returns:

getInstance

public static Collection.Key getInstance(String key)
used for static iniatisation of a key object (used by compiler)

Parameters:
string -
Returns:

intern

public static Collection.Key intern(String key)

charAt

public char charAt(int index)
Description copied from interface: Collection.Key
return char at given position

Specified by:
charAt in interface Collection.Key
Returns:
character at given position
See Also:
Collection.Key.charAt(int)

lowerCharAt

public char lowerCharAt(int index)
Description copied from interface: Collection.Key
return lower case char a given position

Specified by:
lowerCharAt in interface Collection.Key
Returns:
lower case char from given position
See Also:
Collection.Key.lowerCharAt(int)

upperCharAt

public char upperCharAt(int index)
Description copied from interface: Collection.Key
return upper case char a given position

Specified by:
upperCharAt in interface Collection.Key
Returns:
upper case char from given position

getLowerString

public String getLowerString()
Description copied from interface: Collection.Key
return key as lower case String

Specified by:
getLowerString in interface Collection.Key
See Also:
Collection.Key.getLowerString()

getUpperString

public String getUpperString()
Description copied from interface: Collection.Key
return key as upper case String

Specified by:
getUpperString in interface Collection.Key

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getString

public String getString()
Description copied from interface: Collection.Key
return key as String

Specified by:
getString in interface Collection.Key
See Also:
Collection.Key.getString()

equals

public boolean equals(Object other)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

equalsIgnoreCase

public boolean equalsIgnoreCase(Collection.Key key)
Description copied from interface: Collection.Key
compare to object, ignore case of input

Specified by:
equalsIgnoreCase in interface Collection.Key
Returns:
is equal to given key?
See Also:
Collection.Key.equalsIgnoreCase(railo.runtime.type.Collection.Key)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

getId

public int getId()
Specified by:
getId in interface Collection.Key
Returns:
return id for this key, this key is unique for the system but ignore case of input
See Also:
Collection.Key.getId()

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
Returns:
boolean Value representation of the Object
Throws:
PageException
See Also:
Castable.castToBooleanValue()

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
Returns:
boolean Value representation of the Object
See Also:
Castable.castToBoolean(java.lang.Boolean)

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
Returns:
date time representation of the Object
Throws:
PageException
See Also:
Castable.castToDateTime()

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
Parameters:
defaultValue - returned when it is not possible to cast to a dateTime object
Returns:
date time representation of the Object
See Also:
Castable.castToDateTime(railo.runtime.type.dt.DateTime)

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
Returns:
double Value representation of the Object
Throws:
PageException
See Also:
Castable.castToDoubleValue()

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
Returns:
double Value representation of the Object
See Also:
Castable.castToDoubleValue(double)

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
Returns:
String representation of the Object
Throws:
PageException
See Also:
Castable.castToString()

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
Returns:
String representation of the Object
See Also:
Castable.castToString(java.lang.String)

compareTo

public int compareTo(boolean b)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
railo.runtime.op.Castable#compare(boolean)

compareTo

public int compareTo(DateTime dt)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(railo.runtime.type.dt.DateTime)

compareTo

public int compareTo(double d)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(double)

compareTo

public int compareTo(String str)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(java.lang.String)

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

toUpperCaseArray

public static Array toUpperCaseArray(Collection.Key[] keys)

toLowerCaseArray

public static Array toLowerCaseArray(Collection.Key[] keys)

toArray

public static Array toArray(Collection.Key[] keys)

toUpperCaseList

public static String toUpperCaseList(Collection.Key[] array,
                                     String delimeter)

toList

public static String toList(Collection.Key[] array,
                            String delimeter)

toLowerCaseList

public static String toLowerCaseList(Collection.Key[] array,
                                     String delimeter)

toKey

public static Collection.Key toKey(Object obj,
                                   Collection.Key defaultValue)

toKey

public static Collection.Key toKey(Object obj)
                            throws CasterException
Throws:
CasterException

sizeOf

public long sizeOf()
Description copied from interface: Sizeable
return the size of the object

Specified by:
sizeOf in interface Sizeable
Returns:
size of the object


Copyright © 2012 Railo