com.wutka.dtd

Class DTDEnumeration

Implemented Interfaces:
DTDOutput

public class DTDEnumeration
extends Object
implements DTDOutput

Represents an enumeration of attribute values
Version:
$Revision: 1.16 $ $Date: 2002/07/19 01:20:11 $ 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 item, int i)
Stores an item in the enumeration
void
setItem(String[] newItems)
Sets the items in the enumeration
void
write(PrintWriter out)
Writes out a declaration for this enumeration

Field Details

items

protected Vector items

Constructor Details

DTDEnumeration

public DTDEnumeration()
Creates a new enumeration

Method Details

add

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

equals

public boolean equals(Object ob)

getItem

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

getItem

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

getItems

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

getItemsVec

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

remove

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

setItem

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

setItem

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

write

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

Copyright (c) 2001 Mark Wutka.