gnu.lists
Class Convert
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static Convert instance
Convert
public Convert()
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)