gnu.lists
Class Convert

java.lang.Object
  extended by gnu.lists.Convert
Direct Known Subclasses:
KawaConvert

public class Convert
extends java.lang.Object

A class that encapsulates primitive<->Object conversions. Applications can override the conversion if desired. For example charToObject could use an "intern" table.


Field Summary
static Convert instance
           
 
Constructor Summary
Convert()
           
 
Method Summary
 java.lang.Object booleanToObject(boolean value)
           
 java.lang.Object byteToObject(byte value)
           
 java.lang.Object byteToObjectUnsigned(byte value)
           
 java.lang.Object charToObject(char ch)
           
 java.lang.Object doubleToObject(double value)
           
 java.lang.Object floatToObject(float value)
           
static Convert getInstance()
           
 java.lang.Object intToObject(int value)
           
 java.lang.Object intToObjectUnsigned(int value)
           
 java.lang.Object longToObject(long value)
           
 java.lang.Object longToObjectUnsigned(long value)
           
 boolean objectToBoolean(java.lang.Object obj)
           
 byte objectToByte(java.lang.Object obj)
           
 byte objectToByteUnsigned(java.lang.Object obj)
           
 char objectToChar(java.lang.Object obj)
           
 double objectToDouble(java.lang.Object obj)
           
 float objectToFloat(java.lang.Object obj)
           
 int objectToInt(java.lang.Object obj)
           
 int objectToIntUnsigned(java.lang.Object obj)
           
 long objectToLong(java.lang.Object obj)
           
 long objectToLongUnsigned(java.lang.Object obj)
           
 short objectToShort(java.lang.Object obj)
           
 short objectToShortUnsigned(java.lang.Object obj)
           
static double parseDouble(java.lang.String str)
           
static void setInstance(Convert value)
           
 java.lang.Object shortToObject(short value)
           
 java.lang.Object shortToObjectUnsigned(short value)
           
static boolean toBoolean(java.lang.Object obj)
           
static byte toByte(java.lang.Object obj)
           
static byte toByteUnsigned(java.lang.Object obj)
           
static char toChar(java.lang.Object obj)
           
static double toDouble(java.lang.Object obj)
           
static float toFloat(java.lang.Object obj)
           
static int toInt(java.lang.Object obj)
           
static int toIntUnsigned(java.lang.Object obj)
           
static long toLong(java.lang.Object obj)
           
static long toLongUnsigned(java.lang.Object obj)
           
static java.lang.Object toObject(boolean value)
           
static java.lang.Object toObject(byte value)
           
static java.lang.Object toObject(char ch)
           
static java.lang.Object toObject(double value)
           
static java.lang.Object toObject(float value)
           
static java.lang.Object toObject(int value)
           
static java.lang.Object toObject(long value)
           
static java.lang.Object toObject(short value)
           
static java.lang.Object toObjectUnsigned(byte value)
           
static java.lang.Object toObjectUnsigned(int value)
           
static java.lang.Object toObjectUnsigned(long value)
           
static java.lang.Object toObjectUnsigned(short value)
           
static short toShort(java.lang.Object obj)
           
static short toShortUnsigned(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static Convert instance
Constructor Detail

Convert

public Convert()
Method Detail

getInstance

public static Convert getInstance()

setInstance

public static void setInstance(Convert value)

booleanToObject

public java.lang.Object booleanToObject(boolean value)

objectToBoolean

public boolean objectToBoolean(java.lang.Object obj)

toObject

public static java.lang.Object toObject(boolean value)

toBoolean

public static boolean toBoolean(java.lang.Object obj)

charToObject

public java.lang.Object charToObject(char ch)

objectToChar

public char objectToChar(java.lang.Object obj)

toObject

public static java.lang.Object toObject(char ch)

toChar

public static char toChar(java.lang.Object obj)

byteToObject

public java.lang.Object byteToObject(byte value)

objectToByte

public byte objectToByte(java.lang.Object obj)

toObject

public static java.lang.Object toObject(byte value)

toByte

public static byte toByte(java.lang.Object obj)

byteToObjectUnsigned

public java.lang.Object byteToObjectUnsigned(byte value)

objectToByteUnsigned

public byte objectToByteUnsigned(java.lang.Object obj)

toObjectUnsigned

public static java.lang.Object toObjectUnsigned(byte value)

toByteUnsigned

public static byte toByteUnsigned(java.lang.Object obj)

shortToObject

public java.lang.Object shortToObject(short value)

objectToShort

public short objectToShort(java.lang.Object obj)

toObject

public static java.lang.Object toObject(short value)

toShort

public static short toShort(java.lang.Object obj)

shortToObjectUnsigned

public java.lang.Object shortToObjectUnsigned(short value)

objectToShortUnsigned

public short objectToShortUnsigned(java.lang.Object obj)

toObjectUnsigned

public static java.lang.Object toObjectUnsigned(short value)

toShortUnsigned

public static short toShortUnsigned(java.lang.Object obj)

intToObject

public java.lang.Object intToObject(int value)

objectToInt

public int objectToInt(java.lang.Object obj)

toObject

public static java.lang.Object toObject(int value)

toInt

public static int toInt(java.lang.Object obj)

intToObjectUnsigned

public java.lang.Object intToObjectUnsigned(int value)

objectToIntUnsigned

public int objectToIntUnsigned(java.lang.Object obj)

toObjectUnsigned

public static java.lang.Object toObjectUnsigned(int value)

toIntUnsigned

public static int toIntUnsigned(java.lang.Object obj)

longToObject

public java.lang.Object longToObject(long value)

objectToLong

public long objectToLong(java.lang.Object obj)

toObject

public static java.lang.Object toObject(long value)

toLong

public static long toLong(java.lang.Object obj)

longToObjectUnsigned

public java.lang.Object longToObjectUnsigned(long value)

objectToLongUnsigned

public long objectToLongUnsigned(java.lang.Object obj)

toObjectUnsigned

public static java.lang.Object toObjectUnsigned(long value)

toLongUnsigned

public static long toLongUnsigned(java.lang.Object obj)

floatToObject

public java.lang.Object floatToObject(float value)

objectToFloat

public float objectToFloat(java.lang.Object obj)

toObject

public static java.lang.Object toObject(float value)

toFloat

public static float toFloat(java.lang.Object obj)

doubleToObject

public java.lang.Object doubleToObject(double value)

objectToDouble

public double objectToDouble(java.lang.Object obj)

toObject

public static java.lang.Object toObject(double value)

toDouble

public static double toDouble(java.lang.Object obj)

parseDouble

public static double parseDouble(java.lang.String str)