com.wutka.dtd

Class DTDContainer

Implemented Interfaces:
DTDOutput
Known Direct 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.16 $ $Date: 2002/07/19 01:20:11 $ by $Author: wutka $
Author:
Mark Wutka

Field Summary

protected Vector
items

Fields inherited from class com.wutka.dtd.DTDItem

cardinal

Constructor Summary

DTDContainer()
Creates a new DTDContainer

Method Summary

void
add(DTDItem item)
Adds an element to the container
boolean
equals(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
Vector
getItemsVec()
Returns the elements as a vector (not a clone!)
void
remove(DTDItem item)
Removes an element from the container
void
setItem(DTDItem anItem, int i)
Stores an item in the container
void
setItem(DTDItem[] newItems)
Stores items in the container
abstract void
write(PrintWriter out)
Writes out a declaration for this item

Methods inherited from class com.wutka.dtd.DTDItem

equals, getCardinal, setCardinal, write

Field Details

items

protected Vector items

Constructor Details

DTDContainer

public DTDContainer()
Creates a new DTDContainer

Method Details

add

public void add(DTDItem item)
Adds an element to the container

equals

public boolean equals(Object ob)
Overrides:
equals in interface DTDItem

getItem

public DTDItem[] getItem()
Retrieves the items in the container

getItem

public DTDItem getItem(int i)
Retrieves an item from the container

getItems

public DTDItem[] getItems()
Returns the elements as an array of items

getItemsVec

public Vector getItemsVec()
Returns the elements as a vector (not a clone!)

remove

public void remove(DTDItem item)
Removes an element from the container

setItem

public void setItem(DTDItem anItem,
                    int i)
Stores an item in the container

setItem

public void setItem(DTDItem[] newItems)
Stores items in the container

write

public abstract void write(PrintWriter out)
            throws IOException
Writes out a declaration for this item
Specified by:
write in interface DTDOutput
Overrides:
write in interface DTDItem

Copyright (c) 2001 Mark Wutka.