|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
com.wm.data.MByte
public class MByte
This class is a wrapper for byte values and is similar to the existing Java wrapper class Byte. However, unlike the Byte class, MByte is mutable, allowing you to change the byte value that it wraps.
MBoolean
,
MDouble
,
MFloat
,
MInteger
,
MLong
,
MShort
,
Serialized FormConstructor Summary | |
---|---|
MByte(byte num)
Constructs an MByte object and sets it to the specified byte value. |
|
MByte(java.lang.String s)
Constructs an MByte object and sets it according to the value specified in the String parameter, s. |
Method Summary | |
---|---|
byte |
byteValue()
Returns the value of this MByte object as a byte. |
double |
doubleValue()
Returns the value of the MByte object as a double. |
float |
floatValue()
Returns the value of the MByte object as a float. |
byte |
getValue()
Returns the value of this MByte object as a byte. |
int |
intValue()
Returns the value of this MByte object as an int. |
long |
longValue()
Returns the value of this MByte object as a long. |
void |
setValue(byte num)
Sets this MByte object to the specified byte value. |
short |
shortValue()
Returns the value of this MByte object as a short. |
java.lang.String |
toString()
Returns a String representation of this MByte object's value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MByte(byte num)
num
- A byte that specifies the value of the new MByte object.public MByte(java.lang.String s) throws java.lang.NumberFormatException
s
- A String that specifies the value of the new MByte object.
java.lang.NumberFormatException
- If s does not contain a String that can be
successfully converted to a byte value.Method Detail |
---|
public void setValue(byte num)
num
- A byte specifying the value to which this MByte object will be set.public byte getValue()
public java.lang.String toString()
toString
in class java.lang.Object
public byte byteValue()
byteValue
in class java.lang.Number
public short shortValue()
shortValue
in class java.lang.Number
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |