com.wutka.dtd
Class DTDContainer
java.lang.Object
|
+--com.wutka.dtd.DTDItem
|
+--com.wutka.dtd.DTDContainer
- All Implemented Interfaces:
- DTDOutput
- Direct Known Subclasses:
- DTDChoice, DTDMixed, DTDSequence
- public abstract class DTDContainer
- extends DTDItem
Represents an item that may contain other items (such as a
DTDChoice or a DTDSequence)
- Version:
- $Revision: 1.12 $ $Date: 2000/09/01 13:21:05 $ by $Author: wutka $
- Author:
- Mark Wutka
Constructor Summary |
DTDContainer()
Creates a new DTDContainer |
items
protected Vector items
DTDContainer
public DTDContainer()
- Creates a new DTDContainer
add
public void add(DTDItem item)
- Adds an element to the container
remove
public void remove(DTDItem item)
- Removes an element from the container
getItemsVec
public Vector getItemsVec()
- Returns the elements as a vector (not a clone!)
getItems
public DTDItem[] getItems()
- Returns the elements as an array of items
equals
public boolean equals(Object ob)
- Overrides:
equals
in class DTDItem
setItem
public void setItem(DTDItem[] newItems)
- Stores items in the container
getItem
public DTDItem[] getItem()
- Retrieves the items in the container
setItem
public void setItem(DTDItem anItem,
int i)
- Stores an item in the container
getItem
public DTDItem getItem(int i)
- Retrieves an item from the container
write
public abstract void write(PrintWriter out)
throws IOException
- Description copied from class:
DTDItem
- Writes out a declaration for this item
- Overrides:
write
in class DTDItem