railo.runtime.type.dt
Class DateTimeImpl

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

public final class DateTimeImpl
extends DateTime
implements SimpleValue, Localized, Sizeable

Printable and Castable DateTime Object

See Also:
Serialized Form

Constructor Summary
DateTimeImpl()
           
DateTimeImpl(Calendar calendar)
           
DateTimeImpl(Config config)
           
DateTimeImpl(Config config, long utcTime, boolean doOffset)
           
DateTimeImpl(Date date)
           
DateTimeImpl(long utcTime, boolean doOffset)
           
DateTimeImpl(PageContext pc)
           
DateTimeImpl(PageContext pc, long utcTime, boolean doOffset)
           
 
Method Summary
static long addOffset(Config config, long utcTime)
           
 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
 String castToString(TimeZone tz)
           
 int compareTo(boolean b)
           
 int compareTo(DateTime dt)
           
 int compareTo(double d)
           
 int compareTo(String str)
           
 long sizeOf()
          return the size of the object
 double toDoubleValue()
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
 String toString()
           
 
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, UTC
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateTimeImpl

public DateTimeImpl(PageContext pc)

DateTimeImpl

public DateTimeImpl(Config config)

DateTimeImpl

public DateTimeImpl()

DateTimeImpl

public DateTimeImpl(PageContext pc,
                    long utcTime,
                    boolean doOffset)

DateTimeImpl

public DateTimeImpl(Config config,
                    long utcTime,
                    boolean doOffset)

DateTimeImpl

public DateTimeImpl(long utcTime,
                    boolean doOffset)

DateTimeImpl

public DateTimeImpl(Date date)

DateTimeImpl

public DateTimeImpl(Calendar calendar)
Method Detail

addOffset

public static long addOffset(Config config,
                             long utcTime)

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
See Also:
railo.runtime.dump.Dumpable#toDumpData(railo.runtime.PageContext, int)

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
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)

castToString

public String castToString(TimeZone tz)

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
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)

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
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)

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
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)

toDoubleValue

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

compareTo

public int compareTo(boolean b)
Specified by:
compareTo in interface Castable
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)
Specified by:
compareTo in interface Castable
See Also:
Castable.compareTo(java.lang.String)

toString

public String toString()
Overrides:
toString in class Date

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