anon.terms
Class TCComposite

java.lang.Object
  extended by anon.terms.TCComponent
      extended by anon.terms.TCComposite
Direct Known Subclasses:
Section

public class TCComposite
extends TCComponent

Container of TCComponents using the composite pattern


Field Summary
protected  java.util.Vector tcComponents
           
 
Fields inherited from class anon.terms.TCComponent
content, id
 
Constructor Summary
TCComposite()
           
TCComposite(double id, java.lang.Object content)
           
 
Method Summary
 void addTCComponent(TCComponent tcComponent)
          Adds the specified TCComponent to this container.
 java.lang.Object clone()
           
 TCComponent getTCComponent(double id)
           
 int getTCComponentCount()
           
 TCComponent[] getTCComponents()
           
 boolean hasContent()
           
 void removeTCComponent(double id)
           
 java.lang.String toString()
           
 
Methods inherited from class anon.terms.TCComponent
equals, getContent, getId, setContent, setId
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tcComponents

protected java.util.Vector tcComponents
Constructor Detail

TCComposite

public TCComposite()

TCComposite

public TCComposite(double id,
                   java.lang.Object content)
Method Detail

addTCComponent

public void addTCComponent(TCComponent tcComponent)
Adds the specified TCComponent to this container. The insertion will place the component according to its id in ascending order. If a component with the same id exists in this section it will be replaced by the specified paragraph

Parameters:
tcComponent - new component to be appended to this container.

removeTCComponent

public void removeTCComponent(double id)

getTCComponentCount

public int getTCComponentCount()

getTCComponents

public TCComponent[] getTCComponents()

getTCComponent

public TCComponent getTCComponent(double id)

hasContent

public boolean hasContent()
Overrides:
hasContent in class TCComponent

toString

public java.lang.String toString()
Overrides:
toString in class TCComponent

clone

public java.lang.Object clone()
Specified by:
clone in class TCComponent