Class Labels


  • public final class Labels
    extends NativeObjectContainer
    Base object to map multi labels options for DataLabelsPlugin.ID plugin configuration.
    It's possible to define multiple labels for each data element using the this object.
    It is an object where each property represents a new label, the key being the label key and the value being the options specific to each label.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • createLabel

        public LabelItem createLabel​(String id)
        Returns new options for specific id.
        Parameters:
        id - id of the options
        Returns:
        the new option for that id
      • createLabel

        public LabelItem createLabel​(DataLabelId id)
        Returns new options for specific id.
        Parameters:
        id - id of the options
        Returns:
        the new option for that id
      • getLabel

        public LabelItem getLabel​(String id)
        Returns the stored options for specific id.
        Parameters:
        id - id of the options
        Returns:
        the stored option or null if no options are stored for that id
      • getLabel

        public LabelItem getLabel​(DataLabelId id)
        Returns the stored options for specific id.
        Parameters:
        id - id of the options
        Returns:
        the stored option or null if no options are stored for that id
      • hasLabel

        public boolean hasLabel​(String id)
        Returns true if there is a stored options for specific id.
        Parameters:
        id - id of the options
        Returns:
        true if there is a stored options for specific id
      • hasLabel

        public boolean hasLabel​(DataLabelId id)
        Returns true if there is a stored options for specific key.
        Parameters:
        id - key of the options
        Returns:
        true if there is a stored options for specific key
      • removeLabel

        public void removeLabel​(String id)
        Removes an existing label for specific id.
        Parameters:
        id - id of the options
      • removeLabel

        public void removeLabel​(DataLabelId id)
        Removes an existing label for specific id.
        Parameters:
        id - key of the options
      • getLabelKeys

        public List<Key> getLabelKeys()
        Returns the list of all keys related to stored options.
        Returns:
        the list of all keys related to stored options