Class MarshallValueImpl
java.lang.Object
com.sdicons.json.serializer.marshall.MarshallValueImpl
- All Implemented Interfaces:
MarshallValue
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate byteprivate charprivate doubleprivate floatprivate intprivate longprivate Objectprivate shortprivate int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMarshallValueImpl(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 TypeMethodDescriptionbooleanGet the primitive boolean value.bytegetByte()Get the primitive byte value.chargetChar()Get the primitive char value.doubleGet the primitive double value.floatgetFloat()Get the primitive float value.intgetInt()Get the primitive int value.longgetLong()Get the primitive long value.Get the reference to a Java object.shortgetShort()Get the primitive short value.intgetType()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:MarshallValueGet the type of the value so that you can access its value safely.- Specified by:
getTypein interfaceMarshallValue- Returns:
- One of the getValues BOOLEAN, BYTE, SHORT CHAR, INT, LONG, FLOAT, DOUBLE, REFERENCE.
-
getBoolean
Description copied from interface:MarshallValueGet the primitive boolean value.- Specified by:
getBooleanin interfaceMarshallValue- Returns:
- The unmarshalled boolean value.
- Throws:
MarshallException- If it is not a boolean representation.
-
getByte
Description copied from interface:MarshallValueGet the primitive byte value.- Specified by:
getBytein interfaceMarshallValue- Returns:
- The unmarshalled byte value.
- Throws:
MarshallException- If it is not a byte representation.
-
getShort
Description copied from interface:MarshallValueGet the primitive short value.- Specified by:
getShortin interfaceMarshallValue- Returns:
- The unmarshalled short value.
- Throws:
MarshallException- If it is not a short representation.
-
getChar
Description copied from interface:MarshallValueGet the primitive char value.- Specified by:
getCharin interfaceMarshallValue- Returns:
- The unmarshalled char value.
- Throws:
MarshallException- If it is not a char representation.
-
getInt
Description copied from interface:MarshallValueGet the primitive int value.- Specified by:
getIntin interfaceMarshallValue- Returns:
- The unmarshalled int value.
- Throws:
MarshallException- If it is not an int representation.
-
getLong
Description copied from interface:MarshallValueGet the primitive long value.- Specified by:
getLongin interfaceMarshallValue- Returns:
- The unmarshalled long value.
- Throws:
MarshallException- If it is not a long representation.
-
getFloat
Description copied from interface:MarshallValueGet the primitive float value.- Specified by:
getFloatin interfaceMarshallValue- Returns:
- The unmarshalled float value.
- Throws:
MarshallException- If it is not a float representation.
-
getDouble
Description copied from interface:MarshallValueGet the primitive double value.- Specified by:
getDoublein interfaceMarshallValue- Returns:
- The unmarshalled primitive value.
- Throws:
MarshallException- If it is not a double representation.
-
getReference
Description copied from interface:MarshallValueGet the reference to a Java object.- Specified by:
getReferencein interfaceMarshallValue- Returns:
- The unmarshalled reference to the Java object.
- Throws:
MarshallException- If it is not a reference representation.
-