railo.runtime.op
Interface Castable

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

public interface Castable
extends Serializable

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


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)
           
 

Method Detail

castToString

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

String castToString(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

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

Returns:
boolean Value representation of the Object
Throws:
PageException

castToBoolean

Boolean castToBoolean(Boolean defaultValue)
cast the castable value to a boolean value

Returns:
boolean Value representation of the Object
Throws:
PageException

castToDoubleValue

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

Returns:
double Value representation of the Object
Throws:
PageException

castToDoubleValue

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

Returns:
double Value representation of the Object
Throws:
PageException

castToDateTime

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

Returns:
date time representation of the Object
Throws:
PageException

castToDateTime

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

int compareTo(String str)
              throws PageException
Throws:
PageException

compareTo

int compareTo(boolean b)
              throws PageException
Throws:
PageException

compareTo

int compareTo(double d)
              throws PageException
Throws:
PageException

compareTo

int compareTo(DateTime dt)
              throws PageException
Throws:
PageException


Copyright © 2012 Railo