com.sdicons.json.serializer.marshall
Class MarshallValueImpl

java.lang.Object
  extended by com.sdicons.json.serializer.marshall.MarshallValueImpl
All Implemented Interfaces:
MarshallValue

public class MarshallValueImpl
extends Object
implements MarshallValue


Field Summary
 
Fields inherited from interface com.sdicons.json.serializer.marshall.MarshallValue
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, REFERENCE, SHORT
 
Constructor Summary
MarshallValueImpl(boolean aBool)
           
MarshallValueImpl(byte aByte)
           
MarshallValueImpl(char aChar)
           
MarshallValueImpl(double aDouble)
           
MarshallValueImpl(float aFloat)
           
MarshallValueImpl(int aInt)
           
MarshallValueImpl(long aLong)
           
MarshallValueImpl(Object aReference)
           
MarshallValueImpl(short aShort)
           
 
Method Summary
 boolean getBoolean()
          Get the primitive boolean value.
 byte getByte()
          Get the primitive byte value.
 char getChar()
          Get the primitive char value.
 double getDouble()
          Get the primitive double value.
 float getFloat()
          Get the primitive float value.
 int getInt()
          Get the primitive int value.
 long getLong()
          Get the primitive long value.
 Object getReference()
          Get the reference to a Java object.
 short getShort()
          Get the primitive short value.
 int getType()
          Get the type of the value so that you can access its value safely.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshallValueImpl

public MarshallValueImpl(boolean aBool)

MarshallValueImpl

public MarshallValueImpl(byte aByte)

MarshallValueImpl

public MarshallValueImpl(char aChar)

MarshallValueImpl

public MarshallValueImpl(double aDouble)

MarshallValueImpl

public MarshallValueImpl(float aFloat)

MarshallValueImpl

public MarshallValueImpl(int aInt)

MarshallValueImpl

public MarshallValueImpl(long aLong)

MarshallValueImpl

public MarshallValueImpl(short aShort)

MarshallValueImpl

public MarshallValueImpl(Object aReference)
Method Detail

getType

public int getType()
Description copied from interface: MarshallValue
Get the type of the value so that you can access its value safely.

Specified by:
getType in interface MarshallValue
Returns:
One of the getValues BOOLEAN, BYTE, SHORT CHAR, INT, LONG, FLOAT, DOUBLE, REFERENCE.

getBoolean

public boolean getBoolean()
                   throws MarshallException
Description copied from interface: MarshallValue
Get the primitive boolean value.

Specified by:
getBoolean in interface MarshallValue
Returns:
The unmarshalled boolean value.
Throws:
MarshallException - If it is not a boolean representation.

getByte

public byte getByte()
             throws MarshallException
Description copied from interface: MarshallValue
Get the primitive byte value.

Specified by:
getByte in interface MarshallValue
Returns:
The unmarshalled byte value.
Throws:
MarshallException - If it is not a byte representation.

getShort

public short getShort()
               throws MarshallException
Description copied from interface: MarshallValue
Get the primitive short value.

Specified by:
getShort in interface MarshallValue
Returns:
The unmarshalled short value.
Throws:
MarshallException - If it is not a short representation.

getChar

public char getChar()
             throws MarshallException
Description copied from interface: MarshallValue
Get the primitive char value.

Specified by:
getChar in interface MarshallValue
Returns:
The unmarshalled char value.
Throws:
MarshallException - If it is not a char representation.

getInt

public int getInt()
           throws MarshallException
Description copied from interface: MarshallValue
Get the primitive int value.

Specified by:
getInt in interface MarshallValue
Returns:
The unmarshalled int value.
Throws:
MarshallException - If it is not an int representation.

getLong

public long getLong()
             throws MarshallException
Description copied from interface: MarshallValue
Get the primitive long value.

Specified by:
getLong in interface MarshallValue
Returns:
The unmarshalled long value.
Throws:
MarshallException - If it is not a long representation.

getFloat

public float getFloat()
               throws MarshallException
Description copied from interface: MarshallValue
Get the primitive float value.

Specified by:
getFloat in interface MarshallValue
Returns:
The unmarshalled float value.
Throws:
MarshallException - If it is not a float representation.

getDouble

public double getDouble()
                 throws MarshallException
Description copied from interface: MarshallValue
Get the primitive double value.

Specified by:
getDouble in interface MarshallValue
Returns:
The unmarshalled primitive value.
Throws:
MarshallException - If it is not a double representation.

getReference

public Object getReference()
                    throws MarshallException
Description copied from interface: MarshallValue
Get the reference to a Java object.

Specified by:
getReference in interface MarshallValue
Returns:
The unmarshalled reference to the Java object.
Throws:
MarshallException - If it is not a reference representation.


Copyright © 2011. All Rights Reserved.