com.wutka.dtd
Class DTDCardinal
java.lang.Object
|
+--com.wutka.dtd.DTDCardinal
- All Implemented Interfaces:
- DTDOutput
- public class DTDCardinal
- extends Object
- implements DTDOutput
Represents the various cardinality values for a DTD item.
NONE indicates no cardinality
OPTIONAL indicates an optional value (specified by ?)
ZEROMANY indicates zero-to-many values (specified by *)
ONEMANY indicates an one-to-many values (specified by +)
- Version:
- $Revision: 1.12 $ $Date: 2000/09/01 13:21:05 $ by $Author: wutka $
- Author:
- Mark Wutka
NONE
public static final DTDCardinal NONE
- Indicates no cardinality (implies a single object)
OPTIONAL
public static final DTDCardinal OPTIONAL
- Indicates that an item is optional (zero-to-one)
ZEROMANY
public static final DTDCardinal ZEROMANY
- Indicates that there can be zero-to-many occurrances of an item
ONEMANY
public static final DTDCardinal ONEMANY
- Indicates that there can be one-to-many occurrances of an item
type
public int type
name
public String name
DTDCardinal
public DTDCardinal(int aType,
String aName)
equals
public boolean equals(Object ob)
- Overrides:
equals
in class Object
write
public void write(PrintWriter out)
throws IOException
- Writes the notation for this cardinality value
- Specified by:
write
in interface DTDOutput