Package org.simpleframework.xml.core
Class LabelGroup
- java.lang.Object
-
- org.simpleframework.xml.core.LabelGroup
-
class LabelGroup extends java.lang.Object
TheLabelList
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.
-
-
Constructor Summary
Constructors Constructor Description LabelGroup(java.util.List<Label> list)
Constructor for theLabelList
object.LabelGroup(Label label)
Constructor for theLabelList
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.
-
-
-
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 theLabelList
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 theLabelList
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
-
-