Class TestTag

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Set<java.lang.String> RESERVED_CHARACTERS
      Reserved characters that are not permissible as part of a tag name.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static TestTag create​(java.lang.String name)
      Create a TestTag from the supplied name.
      boolean equals​(java.lang.Object obj)  
      java.lang.String getName​()
      Get the name of this tag.
      int hashCode​()  
      static boolean isValid​(java.lang.String name)
      Determine if the supplied tag name is valid with regard to the supported syntax for tags.
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • RESERVED_CHARACTERS

        public static final java.util.Set<java.lang.String> RESERVED_CHARACTERS
        Reserved characters that are not permissible as part of a tag name.
        • ","
        • "("
        • ")"
        • "&"
        • "|"
        • "!"
    • Method Detail

      • create

        public static TestTag create​(java.lang.String name)
                              throws PreconditionViolationException
        Create a TestTag from the supplied name.

        Consider checking whether the syntax of the supplied name is valid before attempting to create a TestTag using this factory method.

        Note: the supplied name will be trimmed.

        Parameters:
        name - the name of the tag; must be syntactically valid
        Throws:
        PreconditionViolationException - if the supplied tag name is not syntactically valid
        See Also:
        isValid(String)
      • getName

        public java.lang.String getName​()
        Get the name of this tag.
        Returns:
        the name of this tag; never null or blank
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object