Package Torello.HTML

Enum TC

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TC>

    public enum TC
    extends java.lang.Enum<TC>
    TC (Tag Criteria) - Documentation.

    TC: Tag Criteria


    This enumerated class identifies the two different types of HTML-tags:

    Some instances of TagNode may be "opening tags"

    FOR EXAMPLE: <A HREF="...">, <DIV ID="...">, or even <UL>.

    There are also "closing tag" versions of HTML TagNode's.

    FOR EXAMPLE: One closing tag would be </A>, or </DIV>, and </UL>.

    This enumerated class is useful when specifying search types to the HTML Tag Search/Get/Remove classes. Many of the search-operation and search-algorithm classes in the package Torello.HTML.* expect a "TC" search parameter as an argument to their method bodies. This Java Enumerated Type facilitates search-specifications in the method parameter lists of the search methods.
    LAST: The type Torello.HTML.TC.Both is used to mean "either" or even "any." All that says is the both opening-tags and closing-tags would satisfy the search criteria.



    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Both
      The TC.Both enumerated type indicates that either of these scenarios will satisfy the search criteria.
      ClosingTags
      ClosingTag indicates HTML TagNode's that constitute the second of the two TagNode pair such as: </A>, rather than <A HREF=...>
      OpeningTags
      OpeningTags indicates HTML TagNode's that constitute the first of a two TagNode pair like: <DIV> rather than / as opposed to </DIV>
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method
      static TC valueOf​(String name)
      static TC[] values()
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • OpeningTags

        public static final TC OpeningTags
        OpeningTags indicates HTML TagNode's that constitute the first of a two TagNode pair like: <DIV> rather than / as opposed to </DIV>
      • ClosingTags

        public static final TC ClosingTags
        ClosingTag indicates HTML TagNode's that constitute the second of the two TagNode pair such as: </A>, rather than <A HREF=...>
      • Both

        public static final TC Both
        The TC.Both enumerated type indicates that either of these scenarios will satisfy the search criteria.
    • Method Detail

      • values

        public static TC[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TC c : TC.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TC valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null