Class TypedChoice<E extends TypedExtension>

All Implemented Interfaces:
TypedContent
Direct Known Subclasses:
Element_a_list.Choice_1, Element_a_tr.Choice_1, Element_and.Choice_1, Element_and.Choice_1_Alt_1_Choice_1, Element_condition.Choice_1, Element_condition.Choice_1_Alt_1_Choice_1, Element_dl.Choice_1, Element_docmat.Choice_1, Element_entries.Choice_1, Element_head.Choice_1, Element_head.Choice_2, Element_head.Choice_2_Alt_1_Choice_1, Element_head.Choice_2_Alt_1_Seq_1_Choice_1, Element_head.Choice_2_Alt_2_Choice_1, Element_head.Choice_2_Alt_2_Seq_1_Choice_1, Element_map.Choice_1, Element_not.Choice_1, Element_not.Choice_1_Alt_1_Choice_1, Element_note.Choice_1, Element_note.Choice_2, Element_optionlist.Choice_1, Element_or.Choice_1, Element_or.Choice_1_Alt_1_Choice_1, Element_package.Choice_1, Element_rep.Choice_1, Element_select.Choice_1, Element_simpletypes.Choice_1, Element_table.Choice_1, Element_table.Choice_2, Element_testequal.Choice_1, Element_testequal.Choice_2, Element_testgreater.Choice_1, Element_testgreater.Choice_2, Element_tr.Choice_1, Element_type.Choice_1, Element_uri.Choice_1

public abstract class TypedChoice<E extends TypedExtension> extends TypedSubtree<E>
Base class for all model classes which represent a choice in a content model. A generated class is derived for each construct like ... , (a|b|c), ... in the underlying DTD.
These classes are only required because several different Java types must be comprehended to form a single sum type. This is not supported in Java, so the subclasses of this class must be inserted into the model instance hierarchy.
  • Field Details

    • altIndex

      protected final int altIndex
  • Constructor Details

    • TypedChoice

      protected TypedChoice(int altIndex)
      Create an instance of a subclass and set its "case identifying" index. ATTENTION, this index is ZERO-BASED, but on the level of the visible names of the generated methods, etc., the alternatives are ONE-BASED!
  • Method Details

    • getAltIndex

      public final int getAltIndex()
      Gets the index number of an instance of a subclass. ATTENTION, this index is ZERO-BASED, but on the level of the visible names of the generated methods, etc., the alternatives are ONE-BASED!