Class LabelGroup

java.lang.Object
org.simpleframework.xml.core.LabelGroup

class LabelGroup extends Object
The LabelList contains a group of labels associated with a specific contact. Here any number of annotations can be associated with a single contact. This allows for element unions that may contain more than one label to be represented.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<Label>
    This contains the list of labels associated with a contact.
    private final int
    This contains the number of labels this list contains.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the LabelList object.
    Constructor for the LabelList object.
  • Method Summary

    Modifier and Type
    Method
    Description
    This is used to acquire all of the labels associated with this group.
    This is used to acquire the primary label associated with this group.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • list

      private final List<Label> list
      This contains the list of labels associated with a contact.
    • size

      private final int size
      This contains the number of labels this list contains.
  • Constructor Details

    • LabelGroup

      public LabelGroup(Label label)
      Constructor for the LabelList object. This is used to create a group of labels that contains a single label. Typically this is used for non-union annotations.
      Parameters:
      label - this is the label that this group represents
    • LabelGroup

      public LabelGroup(List<Label> list)
      Constructor for the LabelList object. This is used to create a group of labels that contains a multiple labels. Typically this is used for union annotations.
      Parameters:
      list - this is the labels that this group contains
  • Method Details

    • getList

      public List<Label> getList()
      This is used to acquire all of the labels associated with this group. For a non-union annotation this will contain a list containing a single label object.
      Returns:
      this returns a list containing a single label
    • getPrimary

      public Label getPrimary()
      This is used to acquire the primary label associated with this group. If this group represents a non-union then this will return the only label associated with the contact.
      Returns:
      this returns the primary annotation for the group