railo.runtime.type
Class FunctionValueImpl

java.lang.Object
  extended by railo.runtime.type.FunctionValueImpl
All Implemented Interfaces:
Serializable, Dumpable, Castable, FunctionValue

public final class FunctionValueImpl
extends Object
implements FunctionValue, Dumpable

represent a named function value for a functions

See Also:
Serialized Form

Constructor Summary
FunctionValueImpl(Collection.Key name, Object value)
           
FunctionValueImpl(String[] names, Object value)
           
FunctionValueImpl(String name, Object value)
          constructor of the class
 
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)
           
 String getName()
           
 Collection.Key getNameAsKey()
           
 String getNameAsString()
           
 String[] getNames()
           
 Object getValue()
           
static FunctionValue newInstance(Collection.Key name, Object value)
           
static FunctionValue newInstance(String[] name, Object value)
           
static FunctionValue newInstance(String name, Object value)
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties)
          method to print out information to a object as HTML
 String toString()
           
static Struct toStruct(FunctionValueImpl fv1)
           
static Struct toStruct(FunctionValueImpl fv1, FunctionValueImpl fv2)
           
static Struct toStruct(FunctionValueImpl fv1, FunctionValueImpl fv2, FunctionValueImpl fv3)
           
static Struct toStruct(FunctionValueImpl fv1, FunctionValueImpl fv2, FunctionValueImpl fv3, FunctionValueImpl fv4)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionValueImpl

public FunctionValueImpl(String name,
                         Object value)
constructor of the class

Parameters:
name - name of the value
value - value himself

FunctionValueImpl

public FunctionValueImpl(Collection.Key name,
                         Object value)

FunctionValueImpl

public FunctionValueImpl(String[] names,
                         Object value)
Method Detail

newInstance

public static FunctionValue newInstance(String name,
                                        Object value)
Parameters:
name -
value -
Returns:

newInstance

public static FunctionValue newInstance(String[] name,
                                        Object value)

newInstance

public static FunctionValue newInstance(Collection.Key name,
                                        Object value)

getName

public String getName()
Specified by:
getName in interface FunctionValue
Returns:
Returns the name.

getNameAsString

public String getNameAsString()
Specified by:
getNameAsString in interface FunctionValue
Returns:
Returns the name as string

getNameAsKey

public Collection.Key getNameAsKey()
Specified by:
getNameAsKey in interface FunctionValue
Returns:
Returns the name as key

getNames

public String[] getNames()

getValue

public Object getValue()
Specified by:
getValue in interface FunctionValue
Returns:
Returns the value.

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

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

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

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

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

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

compareTo

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

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

toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties properties)
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

toString

public String toString()
Overrides:
toString in class Object

toStruct

public static Struct toStruct(FunctionValueImpl fv1)

toStruct

public static Struct toStruct(FunctionValueImpl fv1,
                              FunctionValueImpl fv2)

toStruct

public static Struct toStruct(FunctionValueImpl fv1,
                              FunctionValueImpl fv2,
                              FunctionValueImpl fv3)

toStruct

public static Struct toStruct(FunctionValueImpl fv1,
                              FunctionValueImpl fv2,
                              FunctionValueImpl fv3,
                              FunctionValueImpl fv4)


Copyright © 2012 Railo