CTL.Types
Class Sibling<T>

java.lang.Object
  extended by CTL.Types.Tupel
      extended by CTL.Types.Sibling<T>
All Implemented Interfaces:
Writable, TemplHack

public class Sibling<T>
extends Tupel
implements TemplHack

An element of the CTL tree


Field Summary
 
Fields inherited from class CTL.Types.Tupel
data, type
 
Constructor Summary
Sibling(T data)
          Generate a new Sibling
 
Method Summary
 boolean append(java.lang.Object data)
          Append a new Sibling to the subtree
 boolean append(Sibling sibl)
          Append a new Sibling to the subtree
 java.lang.Object data()
          Retrieve the data associated to this Sibling
 void read(OIStream in)
          Serial read function
 Sibling search(java.lang.Object data)
          Search for a certain Sibling in the sub tree of this node
 void setTypes(TypeTree[] types)
          Template hack implementation
 java.lang.String toString()
          Retrieve a String representation of this object
 
Methods inherited from class CTL.Types.Tupel
equals, insert, item, length, read, setItem, type, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sibling

public Sibling(T data)
        throws CTLException,
               java.lang.ClassNotFoundException
Generate a new Sibling

Parameters:
data - Data which this object should store
Throws:
CTLException
java.lang.ClassNotFoundException
Method Detail

setTypes

public void setTypes(TypeTree[] types)
Template hack implementation

Specified by:
setTypes in interface TemplHack
Overrides:
setTypes in class Tupel
Parameters:
types - Type parameters

search

public Sibling search(java.lang.Object data)
               throws CTLException
Search for a certain Sibling in the sub tree of this node

Parameters:
data - Data to search for
Returns:
Node which holds the data or null if none found
Throws:
CTLException

append

public boolean append(java.lang.Object data)
               throws CTLException,
                      java.lang.ClassNotFoundException
Append a new Sibling to the subtree

Parameters:
data - Data to store
Returns:
Whether or not the new Sibling was succesfully appended
Throws:
CTLException
java.lang.ClassNotFoundException

append

public boolean append(Sibling sibl)
               throws CTLException
Append a new Sibling to the subtree

Parameters:
sibl - Sibling to append
Returns:
Whether or not the new Sibling was succesfully appended
Throws:
CTLException

data

public java.lang.Object data()
                      throws CTLException
Retrieve the data associated to this Sibling

Returns:
Data
Throws:
CTLException

toString

public java.lang.String toString()
Retrieve a String representation of this object

Overrides:
toString in class Tupel
Returns:
String

read

public void read(OIStream in)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException,
                 java.lang.InstantiationException,
                 java.lang.IllegalAccessException,
                 java.lang.reflect.InvocationTargetException
Serial read function

Parameters:
in - Input stream
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException