|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rlcommunity.rlglue.codec.types.RL_abstract_type
public class RL_abstract_type
Common superclass for all of the Java RL-Glue types. Try to keep handles to the objects and not their arrays, because there is no guarantee that the arrays will not be reallocated during certain operations.
Field Summary | |
---|---|
char[] |
charArray
|
double[] |
doubleArray
|
int[] |
intArray
|
Constructor Summary | |
---|---|
RL_abstract_type(int numInts,
int numDoubles,
int numChars)
Create a RL_abstract_type with arrays allocated according to numInts, numDoubles, and numChars |
|
RL_abstract_type(RL_abstract_type src)
Create a new RL_abstract_type that is a deep, independent copy of src. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object cObject)
Allows us to easily compare abstract types so that we can put them in maps and stuff. |
char |
getChar(int which)
|
double |
getDouble(int which)
|
int |
getInt(int which)
|
int |
getNumChars()
|
int |
getNumDoubles()
|
int |
getNumInts()
|
static void |
RLStructCopy(RL_abstract_type src,
RL_abstract_type dest)
Useful (maybe?) utility method for deep copying one RL_Abstract_type into another. |
void |
setChar(int which,
char value)
|
void |
setDouble(int which,
double value)
|
void |
setInt(int which,
int value)
|
java.lang.String |
toString()
Prints out a human-readable format of the RL_abstract_type, which is useful for debugging. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int[] intArray
public double[] doubleArray
public char[] charArray
Constructor Detail |
---|
public RL_abstract_type(int numInts, int numDoubles, int numChars)
numInts
- Size of int array to allocate.numDoubles
- Size of double array to allocate.numChars
- Size of char array to allocate.public RL_abstract_type(RL_abstract_type src)
src
- Method Detail |
---|
public int getInt(int which)
public double getDouble(int which)
public char getChar(int which)
public void setInt(int which, int value)
public void setDouble(int which, double value)
public void setChar(int which, char value)
public int getNumInts()
public int getNumDoubles()
public int getNumChars()
public static void RLStructCopy(RL_abstract_type src, RL_abstract_type dest)
src
- dest
- public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object cObject)
compareTo
in interface java.lang.Comparable
cObject
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |