|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CTL.Types.Tupel<A,B>
public class Tupel<A,B>
CTL Tupel (a fixed-sized array of multiple types)
Field Summary | |
---|---|
protected java.lang.Object[] |
data
Stored data |
protected TypeTree[] |
type
Type paramenters |
Constructor Summary | |
---|---|
protected |
Tupel()
Dummy constructor to make subclasses happy |
|
Tupel(java.lang.Class[] type)
Generate a new Tupel |
|
Tupel(TypeTree[] tree)
Constructor from TypeTree |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object t)
Check if two objects are equal |
protected static java.lang.Class[] |
insert(java.lang.Class[] array,
int idx,
java.lang.Class moo)
Array helper function |
java.lang.Object |
item(int i)
Retrieve the value of a specific element |
int |
length()
Retrieve the number of elements this Tupel can store |
void |
read(SerialIn in)
Serial read function |
void |
setItem(int i,
java.lang.Object data)
Set the value of a specific element |
void |
setTypes(TypeTree[] types)
Set the type parameters |
java.lang.String |
toString()
Retrieve a string representation of this object |
java.lang.Class |
type(int i)
Retrieve the type of a specific element |
void |
write(SerialOut out)
Serial write function |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected TypeTree[] type
protected java.lang.Object[] data
Constructor Detail |
---|
protected Tupel()
public Tupel(java.lang.Class[] type) throws CTLException, java.lang.ClassNotFoundException
type
- Type parameters
CTLException
java.lang.ClassNotFoundException
public Tupel(TypeTree[] tree) throws CTLException, java.lang.ClassNotFoundException
CTLException
java.lang.ClassNotFoundException
Method Detail |
---|
protected static java.lang.Class[] insert(java.lang.Class[] array, int idx, java.lang.Class moo)
array
- Array of classesidx
- Index numbermoo
- New value
public void setTypes(TypeTree[] types)
setTypes
in interface TemplHack
types
- Array of classespublic java.lang.String toString()
toString
in class java.lang.Object
public int length()
public java.lang.Class type(int i) throws CTLException
i
- Index number
CTLException
public java.lang.Object item(int i) throws CTLException
i
- Index number
CTLException
public void setItem(int i, java.lang.Object data) throws CTLException
i
- Index numberdata
- New value
CTLException
public void read(SerialIn in) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
read
in interface Writable
in
- Input stream
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public void write(SerialOut out) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
write
in interface Writable
out
- Output stream
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public boolean equals(java.lang.Object t)
equals
in class java.lang.Object
t
- Object to compare to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |