net.sourceforge.jpalm.mobiledb.field.type
Class Number

java.lang.Object
  extended by net.sourceforge.jpalm.mobiledb.field.type.Number
All Implemented Interfaces:
Type<java.lang.Double>

public class Number
extends java.lang.Object
implements Type<java.lang.Double>

A number in a MobileDB record.


Field Summary
protected  T value
           
 
Constructor Summary
Number()
          Creates a new number representing "".
Number(java.lang.Byte number)
          Creates a new number.
Number(java.lang.Double number)
          Creates a new number.
Number(java.lang.Float number)
          Creates a new number.
Number(java.lang.Integer number)
          Creates a new number.
Number(java.lang.Long number)
          Creates a new number.
Number(java.lang.Short number)
          Creates a new number.
 
Method Summary
 boolean equals(java.lang.Object object)
           
static Number fromMobileDB(java.lang.String string)
          Creates a number from the MobileDB value.
 java.lang.Double getValue()
          Gets the native object for this type.
 java.lang.String toMobileDB()
          Gets the MobileDB value for this type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected T value
Constructor Detail

Number

public Number()
Creates a new number representing "".


Number

public Number(java.lang.Double number)
Creates a new number.

Parameters:
number - the number

Number

public Number(java.lang.Float number)
Creates a new number.

Parameters:
number - the number

Number

public Number(java.lang.Byte number)
Creates a new number.

Parameters:
number - the number

Number

public Number(java.lang.Short number)
Creates a new number.

Parameters:
number - the number

Number

public Number(java.lang.Integer number)
Creates a new number.

Parameters:
number - the number

Number

public Number(java.lang.Long number)
Creates a new number.

Parameters:
number - the number
Method Detail

toMobileDB

public java.lang.String toMobileDB()
Description copied from interface: Type
Gets the MobileDB value for this type.

Specified by:
toMobileDB in interface Type<java.lang.Double>
Returns:
the MobileDB value

fromMobileDB

public static Number fromMobileDB(java.lang.String string)
Creates a number from the MobileDB value.

Parameters:
string - the MobileDB value to convert
Returns:
a number

toString

public java.lang.String toString()

getValue

public java.lang.Double getValue()
Description copied from interface: Type
Gets the native object for this type.

Specified by:
getValue in interface Type<java.lang.Double>
Returns:
the native object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object