com.wutka.dtd
Class DTDEnumeration

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

public class DTDEnumeration
extends java.lang.Object
implements DTDOutput

Represents an enumeration of attribute values


Field Summary
protected  java.util.Vector items
           
 
Constructor Summary
DTDEnumeration()
          Creates a new enumeration
 
Method Summary
 void add(java.lang.String item)
          Adds a new value to the list of values
 boolean equals(java.lang.Object ob)
           
 java.lang.String[] getItem()
          Returns the items in the enumeration
 java.lang.String getItem(int i)
          Retrieves an item from the enumeration
 java.lang.String[] getItems()
          Returns the values as an array
 java.util.Vector getItemsVec()
          Returns the values as a vector (not a clone!)
 void remove(java.lang.String item)
          Removes a value from the list of values
 void setItem(java.lang.String[] newItems)
          Sets the items in the enumeration
 void setItem(java.lang.String item, int i)
          Stores an item in the enumeration
 void write(java.io.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 java.util.Vector items
Constructor Detail

DTDEnumeration

public DTDEnumeration()
Creates a new enumeration
Method Detail

add

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

remove

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

getItems

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

getItemsVec

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

write

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

equals

public boolean equals(java.lang.Object ob)
Overrides:
equals in class java.lang.Object

getItem

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

setItem

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

setItem

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

getItem

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