railo.runtime.op
Interface Castable

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
Application, Argument, Array, Caller, CGI, Client, Cluster, Collection, Component, Cookie, Form, FunctionValue, Local, Objects, Query, QueryColumn, QueryTable, Request, Scope, Server, Session, Struct, Threads, TimeSpan, Undefined, URL, URLForm, Variables
All Known Implementing Classes:
DateTime

public interface Castable
extends java.io.Serializable

Interface to define a Object as Castable, for Railo Type Casts


Method Summary
 java.lang.Boolean castToBoolean(java.lang.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
 java.lang.String castToString()
          cast the castable value to a string, other than the Method toString, this Method can throw a Exception
 java.lang.String castToString(java.lang.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(java.lang.String str)
           
 

Method Detail

castToString

public java.lang.String castToString()
                              throws PageException
cast the castable value to a string, other than the Method toString, this Method can throw a Exception

Returns:
String representation of the Object
Throws:
PageException

castToString

public java.lang.String castToString(java.lang.String defaultValue)
cast the castable value to a string, return the default value, when the method is not castable

Returns:
String representation of the Object
Throws:
PageException

castToBooleanValue

public boolean castToBooleanValue()
                           throws PageException
cast the castable value to a boolean value

Returns:
boolean Value representation of the Object
Throws:
PageException

castToBoolean

public java.lang.Boolean castToBoolean(java.lang.Boolean defaultValue)
cast the castable value to a boolean value

Returns:
boolean Value representation of the Object
Throws:
PageException

castToDoubleValue

public double castToDoubleValue()
                         throws PageException
cast the castable value to a double value

Returns:
double Value representation of the Object
Throws:
PageException

castToDoubleValue

public double castToDoubleValue(double defaultValue)
cast the castable value to a double value

Returns:
double Value representation of the Object
Throws:
PageException

castToDateTime

public DateTime castToDateTime()
                        throws PageException
cast the castable value to a date time object

Returns:
date time representation of the Object
Throws:
PageException

castToDateTime

public DateTime castToDateTime(DateTime defaultValue)
cast the castable value to a date time object

Parameters:
defaultValue - returned when it is not possible to cast to a dateTime object
Returns:
date time representation of the Object
Throws:
PageException

compareTo

public int compareTo(java.lang.String str)
              throws PageException
Throws:
PageException

compareTo

public int compareTo(boolean b)
              throws PageException
Throws:
PageException

compareTo

public int compareTo(double d)
              throws PageException
Throws:
PageException

compareTo

public int compareTo(DateTime dt)
              throws PageException
Throws:
PageException