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)
Field Summary |
protected java.util.Vector |
items
|
Constructor Summary |
DTDContainer()
Creates a new DTDContainer |
Method Summary |
void |
add(DTDItem item)
Adds an element to the container |
boolean |
equals(java.lang.Object ob)
|
DTDItem[] |
getItem()
Retrieves the items in the container |
DTDItem |
getItem(int i)
Retrieves an item from the container |
DTDItem[] |
getItems()
Returns the elements as an array of items |
java.util.Vector |
getItemsVec()
Returns the elements as a vector (not a clone!) |
void |
remove(DTDItem item)
Removes an element from the container |
void |
setItem(DTDItem[] newItems)
Stores items in the container |
void |
setItem(DTDItem anItem,
int i)
Stores an item in the container |
abstract void |
write(java.io.PrintWriter out)
Writes out a declaration for this item |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
items
protected java.util.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 java.util.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(java.lang.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(java.io.PrintWriter out)
throws java.io.IOException
- Description copied from class:
DTDItem
- Writes out a declaration for this item
- Overrides:
write
in class DTDItem