railo.runtime.type.dt
Class TimeImpl

java.lang.Object
  extended by java.util.Date
      extended by railo.runtime.type.dt.DateTime
          extended by railo.runtime.type.dt.Time
              extended by railo.runtime.type.dt.TimeImpl
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Date>, Dumpable, Castable, SimpleValue

public final class TimeImpl
extends Time
implements SimpleValue

Printable and Castable Time Object (at the moment, same as DateTime)

See Also:
Serialized Form

Constructor Summary
TimeImpl(boolean addOffset)
           
TimeImpl(Date date)
           
TimeImpl(long utcTime)
           
TimeImpl(long utcTime, boolean addOffset)
           
TimeImpl(PageContext pc, boolean addOffset)
           
TimeImpl(PageContext pc, long utcTime, boolean addOffset)
           
 
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)
           
 double toDoubleValue()
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, toString, UTC
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeImpl

public TimeImpl(long utcTime)

TimeImpl

public TimeImpl(boolean addOffset)

TimeImpl

public TimeImpl(long utcTime,
                boolean addOffset)

TimeImpl

public TimeImpl(PageContext pc,
                boolean addOffset)

TimeImpl

public TimeImpl(PageContext pc,
                long utcTime,
                boolean addOffset)

TimeImpl

public TimeImpl(Date date)
Method Detail

castToString

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

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

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
Returns:
HTML print out

castToBooleanValue

public boolean castToBooleanValue()
                           throws ExpressionException
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:
ExpressionException

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

castToDoubleValue

public double castToDoubleValue()
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

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

castToDateTime

public DateTime castToDateTime()
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

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

toDoubleValue

public double toDoubleValue()
Specified by:
toDoubleValue in class DateTime
Returns:
returns the CFML type double value represent a date

compareTo

public int compareTo(boolean b)
Specified by:
compareTo in interface Castable

compareTo

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

compareTo

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

compareTo

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


Copyright © 2012 Railo