org.menagery.dtd
Class OptionList
java.lang.Object
|
+--org.menagery.dtd.Option
|
+--org.menagery.dtd.OptionList
- public class OptionList
- extends Option
|
Field Summary |
static int |
LIST_AND
Indicates that the list is a sequential AND type list (,) |
static int |
LIST_OR
Indicates that the list is an exclusive OR type list (|) |
|
Constructor Summary |
OptionList()
Creates a new OptionList object. |
|
Method Summary |
void |
addOption(Option option)
Add an Option to the OptionList. |
java.util.Vector |
getOptions()
Get the option list. |
int |
getType()
Gets the list type. |
void |
setLastOptionType(int optiontype)
Sets the type (cardinality) of the last option added (Option or
OptionList). |
void |
setType(int type)
Sets the list type. |
java.lang.String |
toString()
Returns a string representation of this object and it's
aggregate objects. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
LIST_OR
public static final int LIST_OR
- Indicates that the list is an exclusive OR type list (|)
LIST_AND
public static final int LIST_AND
- Indicates that the list is a sequential AND type list (,)
OptionList
public OptionList()
- Creates a new OptionList object.
getType
public int getType()
- Gets the list type.
- Returns:
- The integer type, either LIST_OR or LIST_AND.
setType
public void setType(int type)
- Sets the list type.
- Parameters:
type - The integer list type, either LIST_OR or LIST_AND.
getOptions
public java.util.Vector getOptions()
- Get the option list.
- Returns:
- The list of options as a Vector.
addOption
public void addOption(Option option)
- Add an Option to the OptionList.
- Parameters:
option - The Option to be added.
setLastOptionType
public void setLastOptionType(int optiontype)
- Sets the type (cardinality) of the last option added (Option or
OptionList). The type is one of OPTION_NONE_TO_MANY, OPTION_OPTIONAL,
OPTION_ONE_TO_MANY, or OPTION_NONE.
- Parameters:
optiontype - The integer option type.
toString
public java.lang.String toString()
- Returns a string representation of this object and it's
aggregate objects.
- Overrides:
- toString in class Option
- Returns:
- A String containing a representation of this object.