Class MarshallValueImpl
java.lang.Object
com.sdicons.json.serializer.marshall.MarshallValueImpl
- All Implemented Interfaces:
MarshallValue
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private byte
private char
private double
private float
private int
private long
private Object
private short
private int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
MarshallValueImpl
(boolean aBool) MarshallValueImpl
(byte aByte) MarshallValueImpl
(char aChar) MarshallValueImpl
(double aDouble) MarshallValueImpl
(float aFloat) MarshallValueImpl
(int aInt) MarshallValueImpl
(long aLong) MarshallValueImpl
(short aShort) MarshallValueImpl
(Object aReference) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the primitive boolean value.byte
getByte()
Get the primitive byte value.char
getChar()
Get the primitive char value.double
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.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.
-
Field Details
-
resultBoolean
private boolean resultBoolean -
resultByte
private byte resultByte -
resultShort
private short resultShort -
resultChar
private char resultChar -
resultInt
private int resultInt -
resultLong
private long resultLong -
resultFloat
private float resultFloat -
resultDouble
private double resultDouble -
resultReference
-
resultType
private int resultType
-
-
Constructor Details
-
MarshallValueImpl
private MarshallValueImpl() -
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
-
-
Method Details
-
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 interfaceMarshallValue
- Returns:
- One of the getValues BOOLEAN, BYTE, SHORT CHAR, INT, LONG, FLOAT, DOUBLE, REFERENCE.
-
getBoolean
Description copied from interface:MarshallValue
Get the primitive boolean value.- Specified by:
getBoolean
in interfaceMarshallValue
- Returns:
- The unmarshalled boolean value.
- Throws:
MarshallException
- If it is not a boolean representation.
-
getByte
Description copied from interface:MarshallValue
Get the primitive byte value.- Specified by:
getByte
in interfaceMarshallValue
- Returns:
- The unmarshalled byte value.
- Throws:
MarshallException
- If it is not a byte representation.
-
getShort
Description copied from interface:MarshallValue
Get the primitive short value.- Specified by:
getShort
in interfaceMarshallValue
- Returns:
- The unmarshalled short value.
- Throws:
MarshallException
- If it is not a short representation.
-
getChar
Description copied from interface:MarshallValue
Get the primitive char value.- Specified by:
getChar
in interfaceMarshallValue
- Returns:
- The unmarshalled char value.
- Throws:
MarshallException
- If it is not a char representation.
-
getInt
Description copied from interface:MarshallValue
Get the primitive int value.- Specified by:
getInt
in interfaceMarshallValue
- Returns:
- The unmarshalled int value.
- Throws:
MarshallException
- If it is not an int representation.
-
getLong
Description copied from interface:MarshallValue
Get the primitive long value.- Specified by:
getLong
in interfaceMarshallValue
- Returns:
- The unmarshalled long value.
- Throws:
MarshallException
- If it is not a long representation.
-
getFloat
Description copied from interface:MarshallValue
Get the primitive float value.- Specified by:
getFloat
in interfaceMarshallValue
- Returns:
- The unmarshalled float value.
- Throws:
MarshallException
- If it is not a float representation.
-
getDouble
Description copied from interface:MarshallValue
Get the primitive double value.- Specified by:
getDouble
in interfaceMarshallValue
- Returns:
- The unmarshalled primitive value.
- Throws:
MarshallException
- If it is not a double representation.
-
getReference
Description copied from interface:MarshallValue
Get the reference to a Java object.- Specified by:
getReference
in interfaceMarshallValue
- Returns:
- The unmarshalled reference to the Java object.
- Throws:
MarshallException
- If it is not a reference representation.
-