org.crosswire.common.options
Class DataType

java.lang.Object
  extended by org.crosswire.common.options.DataType
All Implemented Interfaces:
Serializable

public abstract class DataType
extends Object
implements Serializable

A DataType provides the ability to marshal a String value to an object.

Author:
DM Smith [dmsmith555 at yahoo dot com]
See Also:
for license details.
The copyright to this program is held by it's authors.
, Serialized Form

Field Summary
static DataType BOOLEAN
          An boolean argument that allows various values for 'true'.
static DataType INTEGER
          An integer argument.
private  String name
          The name of the DataType
private static int nextObj
           
private  int obj
           
private static long serialVersionUID
          Serialization ID
static DataType STRING
          A string argument.
private static DataType[] VALUES
           
 
Constructor Summary
protected DataType(String name)
           
 
Method Summary
abstract  Object convertFromString(String input)
          Convert a String to an Arguments expected value.
static DataType fromInteger(int i)
          Lookup method to convert from an integer
static DataType fromString(String name)
          Lookup method to convert from a String
(package private)  Object readResolve()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING

public static final DataType STRING
A string argument.


INTEGER

public static final DataType INTEGER
An integer argument.


BOOLEAN

public static final DataType BOOLEAN
An boolean argument that allows various values for 'true'.


name

private String name
The name of the DataType


nextObj

private static int nextObj

obj

private final int obj

VALUES

private static final DataType[] VALUES

serialVersionUID

private static final long serialVersionUID
Serialization ID

See Also:
Constant Field Values
Constructor Detail

DataType

protected DataType(String name)
Parameters:
name - The name of the DataType
Method Detail

convertFromString

public abstract Object convertFromString(String input)
Convert a String to an Arguments expected value.


fromString

public static DataType fromString(String name)
Lookup method to convert from a String


fromInteger

public static DataType fromInteger(int i)
Lookup method to convert from an integer


toString

public String toString()
Overrides:
toString in class Object

readResolve

Object readResolve()

Copyright ยจ 2003-2007