Class Tag


  • public class Tag
    extends java.lang.Object
    This class contains a reference to a tag in a parsed document, the type of tag, and the tag's attributes.
    See Also:
    Parser, HTMLParser
    • Field Summary

      Fields 
      Modifier and Type Field Description
      TagProperties atts
      The tag attributes, in identifier, value pairs.
      boolean isEmpty
      The type of tag, true if an empty tag.
      boolean isEnd
      The type of tag, false if an opening tag or true if a closing tag.
      java.lang.String name
      The name of the tag
    • Constructor Summary

      Constructors 
      Constructor Description
      Tag​(java.lang.String name, TagProperties atts, boolean isEnd, boolean isEmpty)
      Sets the tag, position, and type.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        public java.lang.String name
        The name of the tag
      • isEnd

        public boolean isEnd
        The type of tag, false if an opening tag or true if a closing tag.
      • isEmpty

        public boolean isEmpty
        The type of tag, true if an empty tag.
      • atts

        public TagProperties atts
        The tag attributes, in identifier, value pairs.
    • Constructor Detail

      • Tag

        public Tag​(java.lang.String name,
                   TagProperties atts,
                   boolean isEnd,
                   boolean isEmpty)
        Sets the tag, position, and type.
        Parameters:
        tag - the tag descriptor
        pos - the position in the text
        isEnd - true if a </tag> or <tag/> tag
        isEmpty - true if a <tag/> tag
        See Also:
        Tag