JavaXT

Value Class

A general purpose wrapper for Objects. The value can be converted into a number of Java primatives including strings, integers, doubles, booleans, etc.

Constructors

public Value( Object value )

Methods

equals( Object obj ) returns boolean
Used to compare values. Accepts any object.
isArray( ) returns boolean
Used to determine whether the value is an array.
isNull( ) returns boolean
Used to determine whether the value is null.
isNumeric( ) returns boolean
Used to determine if the value is numeric.
toBigDecimal( ) returns java.math.BigDecimal
Returns the value as a BigDecimal. Returns a null if there was a problem converting the value to a BigDecimal or if the value is null.
toBoolean( ) returns Boolean
Returns a boolean value for the field.
toByteArray( ) returns byte[]
Returns the value as a byte array.
toDate( ) returns javaxt.utils.Date
Returns the value as a Date. Returns a null if there was a problem converting the value to a Date or if the value is null.
toDouble( ) returns Double
Returns the value as a double. Returns a null if there was a problem converting the value to a double or if the value is null.
toFloat( ) returns Float
Returns the value as a float. Returns a null if there was a problem converting the value to a float or if the value is null.
toInteger( ) returns Integer
Returns the value as an integer. Returns a null if there was a problem converting the value to an integer or if the value is null.
toLong( ) returns Long
Returns the value as a long. Returns a null if there was a problem converting the value to a long or if the value is null.
toObject( ) returns Object
toShort( ) returns Short
Returns the value as a short. Returns a null if there was a problem converting the value to a short or if the value is null.
toString( ) returns String
Returns a string representation of the object by calling the object's native toString() method. Returns a null if the object itself is null.