Class GroupedAnnotationLabels

Object
GroupedAnnotationLabels

public class GroupedAnnotationLabels extends Object
A set of AnnotationLabels partitioned into their unique groups.
  • Constructor Details

    • GroupedAnnotationLabels

      public GroupedAnnotationLabels(Collection<AnnotationLabel> labels)
      Creates a new instance of GroupedAnnotationLabels.
      Parameters:
      labels - the collection of AnnotationLabels to group.
  • Method Details

    • numberGroups

      public int numberGroups()
      Gets the number of unique groups.
      Returns:
      the number of groups.
    • keySet

      public Set<String> keySet()
      Gets the set of group keys.
      Returns:
      a set of group keys.
    • get

      public Collection<AnnotationLabel> get(String key)
      Gets the collection of AnnotationLabels for a specific group.
      Parameters:
      key - the group key.
      Returns:
      a collection of AnnotationLabels belonging to the specified group.