Class LabelGroup


  • class LabelGroup
    extends java.lang.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 java.util.List<Label> list
      This contains the list of labels associated with a contact.
      private int size
      This contains the number of labels this list contains.
    • Constructor Summary

      Constructors 
      Constructor Description
      LabelGroup​(java.util.List<Label> list)
      Constructor for the LabelList object.
      LabelGroup​(Label label)
      Constructor for the LabelList object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<Label> getList()
      This is used to acquire all of the labels associated with this group.
      Label getPrimary()
      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 Detail

      • list

        private final java.util.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 Detail

      • 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​(java.util.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 Detail

      • getList

        public java.util.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