com.wutka.dtd
Class DTDEnumeration

java.lang.Object
  |
  +--com.wutka.dtd.DTDEnumeration
All Implemented Interfaces:
DTDOutput

public class DTDEnumeration
extends Object
implements DTDOutput

Represents an enumeration of attribute values

Version:
$Revision: 1.12 $ $Date: 2000/09/01 13:21:05 $ by $Author: wutka $
Author:
Mark Wutka

Field Summary
protected  Vector items
           
 
Constructor Summary
DTDEnumeration()
          Creates a new enumeration
 
Method Summary
 void add(String item)
          Adds a new value to the list of values
 boolean equals(Object ob)
           
 String[] getItem()
          Returns the items in the enumeration
 String getItem(int i)
          Retrieves an item from the enumeration
 String[] getItems()
          Returns the values as an array
 Vector getItemsVec()
          Returns the values as a vector (not a clone!)
 void remove(String item)
          Removes a value from the list of values
 void setItem(String[] newItems)
          Sets the items in the enumeration
 void setItem(String item, int i)
          Stores an item in the enumeration
 void write(PrintWriter out)
          Writes out a declaration for this enumeration
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

protected Vector items
Constructor Detail

DTDEnumeration

public DTDEnumeration()
Creates a new enumeration
Method Detail

add

public void add(String item)
Adds a new value to the list of values

remove

public void remove(String item)
Removes a value from the list of values

getItems

public String[] getItems()
Returns the values as an array

getItemsVec

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

write

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

equals

public boolean equals(Object ob)
Overrides:
equals in class Object

getItem

public String[] getItem()
Returns the items in the enumeration

setItem

public void setItem(String[] newItems)
Sets the items in the enumeration

setItem

public void setItem(String item,
                    int i)
Stores an item in the enumeration

getItem

public String getItem(int i)
Retrieves an item from the enumeration