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

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

public class Checkbox
extends java.lang.Object
implements Type<java.lang.Boolean>

A checkbox in a MobileDB record.


Field Summary
protected  T value
           
 
Constructor Summary
Checkbox()
          Creates a new checkbox that is not checked.
Checkbox(java.lang.Boolean value)
          Creates a new checkbox.
 
Method Summary
 boolean equals(java.lang.Object object)
           
static Checkbox fromMobileDB(java.lang.String string)
          Creates a checkbox from the MobileDB value.
 java.lang.Boolean 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

Checkbox

public Checkbox()
Creates a new checkbox that is not checked.


Checkbox

public Checkbox(java.lang.Boolean value)
Creates a new checkbox.

Parameters:
value - true if the checkbox is checked; false otherwise
Method Detail

fromMobileDB

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

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

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.Boolean>
Returns:
the MobileDB value

getValue

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

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

equals

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object