Interface AnnotationId

  • All Superinterfaces:
    Key, PropertyKey

    public interface AnnotationId
    extends PropertyKey
    Represents the annotation id of a annotation configuration object in the AnnotationPlugin.ID plugin.
    Author:
    Andrea "Stock" Stocchero
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static AnnotationId checkAndGetAnnotationID​(String id, AnnotationId defaultValue)
      Returns the ID of the annotation checking is consistent.
      static void checkIfValid​(String id)
      Checks if id passed as argument is not null and its value is not null as well and could be a valid annotation configuration object id.
      If not, throw a IllegalArgumentException.
      static void checkIfValid​(AnnotationId id)
      Checks if id passed as argument is not null and its value is not null as well and could be a valid annotation configuration object id.
      If not, throw a IllegalArgumentException.
      static AnnotationId create​(String id)
      Returns a key instance by its string value.
      static boolean isValid​(String id)
      Returns true if id passed as argument is not null and its value could be a valid annotation configuration object id.
      static boolean isValid​(AnnotationId id)
      Returns true if id passed as argument is not null and its value is not null as well and could be a valid annotation configuration object id.
      • Methods inherited from interface org.pepstock.charba.client.commons.Key

        value
    • Method Detail

      • create

        static AnnotationId create​(String id)
        Returns a key instance by its string value.
        Parameters:
        id - string value to use
        Returns:
        new annotation configuration object id instance
      • isValid

        static boolean isValid​(String id)
        Returns true if id passed as argument is not null and its value could be a valid annotation configuration object id.
        Parameters:
        id - annotation configuration object id to be checked
        Returns:
        true if id passed as argument is not null and its value could be a valid annotation configuration object id.
      • isValid

        static boolean isValid​(AnnotationId id)
        Returns true if id passed as argument is not null and its value is not null as well and could be a valid annotation configuration object id.
        Parameters:
        id - annotation configuration object id to be checked
        Returns:
        true if id passed as argument is not null and its value is not null as well and could be a valid annotation configuration object id.
      • checkIfValid

        static void checkIfValid​(AnnotationId id)
        Checks if id passed as argument is not null and its value is not null as well and could be a valid annotation configuration object id.
        If not, throw a IllegalArgumentException.
        Parameters:
        id - annotation configuration object id to be checked
      • checkIfValid

        static void checkIfValid​(String id)
        Checks if id passed as argument is not null and its value is not null as well and could be a valid annotation configuration object id.
        If not, throw a IllegalArgumentException.
        Parameters:
        id - annotation configuration object id as string to be checked
      • checkAndGetAnnotationID

        static AnnotationId checkAndGetAnnotationID​(String id,
                                                    AnnotationId defaultValue)
        Returns the ID of the annotation checking is consistent.
        Parameters:
        id - id value, as string, to create new annotation id object
        defaultValue - the default value if the id parameter is not a valid, it can not be a annotation id due to its value.
        Returns:
        the ID of the annotation