com.wutka.dtd
Class DTDCardinal
java.lang.Object
|
+--com.wutka.dtd.DTDCardinal
- All Implemented Interfaces:
- DTDOutput
- public class DTDCardinal
- extends java.lang.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 +)
Constructor Summary |
DTDCardinal(int aType,
java.lang.String aName)
|
Method Summary |
boolean |
equals(java.lang.Object ob)
|
void |
write(java.io.PrintWriter out)
Writes the notation for this cardinality value |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 java.lang.String name
DTDCardinal
public DTDCardinal(int aType,
java.lang.String aName)
equals
public boolean equals(java.lang.Object ob)
- Overrides:
equals
in class java.lang.Object
write
public void write(java.io.PrintWriter out)
throws java.io.IOException
- Writes the notation for this cardinality value
- Specified by:
write
in interface DTDOutput