Package Torello.HTML

Enum TC

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

    public enum TC
    extends java.lang.Enum<TC>
    Tag Criteria - An enumeration that allows a user to specify which type of tag's are being requested when searching a web-page for HTML-Tags.

    TC: Tag Criteria

    This enumerated class identifies the two different types of HTML-tags: OpeningTags and ClosingTags.

    Some instances of TagNode may be "opening tags", as listed in the HiLited Snippet below:

    HTML Elements:
    <A HREF="...">
    <DIV ID="...">

    There are also "closing tag" versions of HTML TagNode's, listed here:

    HTML Elements:

    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.

    The type 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.

    • Method Summary

      Convert String to Enum Constant
      Modifier and Type Method
      static TC valueOf​(String name)
      List all Enum Constants
      Modifier and Type Method
      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())
        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.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null