org.objectweb.joram.shared.messages
Class ConversionHelper

java.lang.Object
  extended byorg.objectweb.joram.shared.messages.ConversionHelper

public class ConversionHelper
extends java.lang.Object

The ConversionHelper class is used for converting values carried by messages into specified types, if possible.


Constructor Summary
ConversionHelper()
           
 
Method Summary
static boolean toBoolean(java.lang.Object value)
          Gets the boolean value of the given object.
static byte toByte(java.lang.Object value)
          Gets the byte value of the given object.
static byte[] toBytes(java.lang.Object value)
          Gets the bytes value of the given object.
static char toChar(java.lang.Object value)
          Gets the char value of the given object.
static double toDouble(java.lang.Object value)
          Gets the double value of the given object.
static float toFloat(java.lang.Object value)
          Gets the float value of the given object.
static int toInt(java.lang.Object value)
          Gets the int value of the given object.
static long toLong(java.lang.Object value)
          Gets the long value of the given object.
static short toShort(java.lang.Object value)
          Gets the short value of the given object.
static java.lang.String toString(java.lang.Object value)
          Gets the String value of the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionHelper

public ConversionHelper()
Method Detail

toBoolean

public static boolean toBoolean(java.lang.Object value)
                         throws MessageValueException
Gets the boolean value of the given object.

Throws:
MessageValueException - If the given object can't be converted into a boolean value.

toByte

public static byte toByte(java.lang.Object value)
                   throws MessageValueException
Gets the byte value of the given object.

Throws:
MessageValueException - If the given object can't be converted into a byte value.

toShort

public static short toShort(java.lang.Object value)
                     throws MessageValueException
Gets the short value of the given object.

Throws:
MessageValueException - If the given object can't be converted into a short value.

toInt

public static int toInt(java.lang.Object value)
                 throws MessageValueException
Gets the int value of the given object.

Throws:
MessageValueException - If the given object can't be converted into an int value.

toLong

public static long toLong(java.lang.Object value)
                   throws MessageValueException
Gets the long value of the given object.

Throws:
MessageValueException - If the given object can't be converted into a long value.

toFloat

public static float toFloat(java.lang.Object value)
                     throws MessageValueException
Gets the float value of the given object.

Throws:
MessageValueException - If the given object can't be converted into a float value.

toDouble

public static double toDouble(java.lang.Object value)
                       throws MessageValueException
Gets the double value of the given object.

Throws:
MessageValueException - If the given object can't be converted into a double value.

toString

public static java.lang.String toString(java.lang.Object value)
Gets the String value of the given object.


toChar

public static char toChar(java.lang.Object value)
                   throws MessageValueException
Gets the char value of the given object.

Throws:
MessageValueException - If the given object can't be converted into a char value.

toBytes

public static byte[] toBytes(java.lang.Object value)
                      throws MessageValueException
Gets the bytes value of the given object.

Throws:
MessageValueException - If the given object can't be converted into a bytes array.


Copyright ? 2004 Scalagent - All rights reserved