Class Tag

    • Field Detail

      • tagType

        protected TagType tagType
    • Constructor Detail

      • Tag

        protected Tag()
        Creates an empty Tag object.
      • Tag

        public Tag​(Tag original)
        Copy constructor.
        Parameters:
        original - the original object to duplicate.
    • Method Detail

      • getTagType

        public TagType getTagType()
        Gets the TagType value of this tag.
        Returns:
        the TagType value of this tag.
      • setTagType

        public void setTagType​(TagType tagType)
        Sets the TagType value of this tag.
        Parameters:
        tagType - the TagType to set.
      • getId

        public abstract String getId()
        Gets the id for the code or annotation using this tag.
        Returns:
        the id for the code or annotation using this tag.
      • getType

        public abstract String getType()
        Gets the type of the code or marker this tag represents.
        Returns:
        the type of the code or marker this tag represents. If this is a CTag the type value can be null.
      • setType

        public abstract void setType​(String type)
        Sets the type of the code or marker (for both opening/closing tags).
        Parameters:
        type - the type of the code or marker this tag represents.
      • isMarker

        public abstract boolean isMarker()
        Indicates if this tag is for a marker (MTag).
        Returns:
        true if this tag is one for a marker (MTag), false if it is for a code (CTag).
      • isCode

        public abstract boolean isCode()
        Indicates if this tag is for a code (CTag).
        Returns:
        true if this tag is used by a code (CTag), false if it is for a marker (MTag).
      • equals

        public boolean equals​(Object other)
        Indicates if this tag is equal to another.

        Use the == operator to test if two tags are the same.

        Overrides:
        equals in class DataWithExtAttributes
        Parameters:
        other - the other tag to compare to this one.
        Returns:
        true if both tags are equals.