|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.utah.janosvm.kit.comm.jsi.JSIPair
A simple class used to couple an identifier string and a byte array value (Usually a string).
Field Summary | |
private static byte[] |
emptyArray
|
private java.lang.String |
tag
The identifier. |
private byte[] |
value
The value. |
Constructor Summary | |
JSIPair(java.lang.String tag,
byte[] value)
Construct an identifier/value pair with the given values. |
|
JSIPair(java.lang.String tag,
char value)
Construct an identifier/value pair with the given values. |
|
JSIPair(java.lang.String tag,
double value)
Construct an identifier/value pair with the given values. |
|
JSIPair(java.lang.String tag,
JSIPropertyInfo pi)
Construct an identifier/value pair with the given values. |
|
JSIPair(java.lang.String tag,
long value)
Construct an identifier/value pair with the given values. |
|
JSIPair(java.lang.String tag,
java.lang.String value)
Construct an identifier/value pair with the given values. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
byte[] |
getByteArrayFromHexValue()
|
char |
getCharValue()
|
double |
getFloatValue()
|
long |
getIntValue()
|
JSIPropertyInfo |
getPropertyInfoValue()
|
java.lang.String |
getStringValue()
|
java.lang.String |
getTag()
|
byte[] |
getValue()
|
int |
hashCode()
|
(package private) int |
length()
|
(package private) void |
marshal(JSIMessage dst)
Marshal this pair into the given message. |
void |
setTag(java.lang.String tag)
|
void |
setValue(byte[] value)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait, wait0 |
Field Detail |
private static final byte[] emptyArray
private java.lang.String tag
private byte[] value
Constructor Detail |
public JSIPair(java.lang.String tag, byte[] value)
tag
- The identifervalue
- The byte array value.public JSIPair(java.lang.String tag, java.lang.String value)
tag
- The identifervalue
- The string value.public JSIPair(java.lang.String tag, char value)
tag
- The identifervalue
- The character value that is downcasted to a single byte.public JSIPair(java.lang.String tag, long value)
tag
- The identifervalue
- The long value that is stored as a decimal string.public JSIPair(java.lang.String tag, double value)
tag
- The identifervalue
- The double value that is stored as a decimal string.public JSIPair(java.lang.String tag, JSIPropertyInfo pi)
tag
- The identifervalue
- The property info value to be stored in its own customvalue
- format.Method Detail |
public void setTag(java.lang.String tag)
tag
- The identifierpublic java.lang.String getTag()
public void setValue(byte[] value)
value
- The valuepublic byte[] getValue()
value
- The valuepublic char getCharValue()
public long getIntValue() throws java.lang.NumberFormatException
Throws
- NumberFormatException if the string in the valueisn't
- a valid integer.public double getFloatValue() throws java.lang.NumberFormatException
Throws
- NumberFormatException if the string in the valueisn't
- a valid flaot.public java.lang.String getStringValue()
public byte[] getByteArrayFromHexValue() throws java.lang.NumberFormatException
public JSIPropertyInfo getPropertyInfoValue()
int length()
void marshal(JSIMessage dst)
dst
- The message this pair should be added to.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |