JanosVM v0.6.0 Java API Documentation: Class JSIPair
edu.utah.janosvm.kit.comm.jsi
Class JSIPair
java.lang.Object
|
+--edu.utah.janosvm.kit.comm.jsi.JSIPair
public class JSIPair extends java.lang.Object
A simple class used to couple an identifier string and a byte array
value (Usually a string).
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,
float 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.
Methods inherited from class java.lang.Object
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait
JSIPair
public JSIPair (java.lang.String tag,
byte[] value)
Construct an identifier/value pair with the given values.
Parameters: tag
- The identifervalue
- The byte array value.
JSIPair
public JSIPair (java.lang.String tag,
java.lang.String value)
Construct an identifier/value pair with the given values.
Parameters: tag
- The identifervalue
- The string value.
JSIPair
public JSIPair (java.lang.String tag,
char value)
Construct an identifier/value pair with the given values.
Parameters: tag
- The identifervalue
- The character value that is downcasted to a single byte.
JSIPair
public JSIPair (java.lang.String tag,
long value)
Construct an identifier/value pair with the given values.
Parameters: tag
- The identifervalue
- The long value that is stored as a decimal string.
JSIPair
public JSIPair (java.lang.String tag,
float value)
Construct an identifier/value pair with the given values.
Parameters: tag
- The identifervalue
- The float value that is stored as a decimal string.
JSIPair
public JSIPair (java.lang.String tag,
JSIPropertyInfo pi)
Construct an identifier/value pair with the given values.
Parameters: tag
- The identifervalue
- The property info value to be stored in its own customvalue
- format.
setTag
public void setTag (java.lang.String tag)
Parameters: tag
- The identifier
getTag
public java.lang.String getTag ()
Returns: The identifier
setValue
public void setValue (byte[] value)
Parameters: value
- The value
getValue
public byte[] getValue ()
Parameters: value
- The value
getCharValue
public char getCharValue ()
Returns: The first byte in the value.
getIntValue
public long getIntValue ()
throws java.lang.NumberFormatException
Returns: The long as parsed from the string value. Throws: Throws - NumberFormatException if the string in the valueisn't - a valid integer.
getFloatValue
public float getFloatValue ()
throws java.lang.NumberFormatException
Returns: The float as parsed from the string value. Throws: Throws - NumberFormatException if the string in the valueisn't - a valid flaot.
getStringValue
public java.lang.String getStringValue ()
Returns: The value as a string.
getByteArrayFromHexValue
public byte[] getByteArrayFromHexValue ()
throws java.lang.NumberFormatException
Returns: The value as a byte array decoded from a hex string.
getPropertyInfoValue
public JSIPropertyInfo getPropertyInfoValue ()
Returns: The value as a property info.
hashCode
public int hashCode ()
Overrides: hashCode in class java.lang.Object
equals
public boolean equals (java.lang.Object obj)
Overrides: equals in class java.lang.Object
toString
public java.lang.String toString ()
Overrides: toString in class java.lang.Object
This documentation is Copyright (C) 2000-2002 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions. Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/ Generated on Mar 17, 2002