Package Torello.HTML
Enum TC
- java.lang.Object
-
- java.lang.Enum<TC>
-
- Torello.HTML.TC
-
- All Implemented Interfaces:
java.io.Serializable
,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
andClosingTags
.
Some instances ofTagNode
may be "opening tags", as listed in the HiLited Snippet below:
HTML Elements:
<A HREF="..."> <DIV ID="..."> <UL>
There are also "closing tag" versions of HTMLTagNode's
, listed here:
HTML Elements:
</A> </DIV> </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 thepackage 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.
ACCEPTING-BOTH:
The typeTC.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.
Hi-Lited Source-Code:- View Here: Torello/HTML/TC.java
- Open New Browser-Tab: Torello/HTML/TC.java
-
-
Enum Constant Summary
Enum Constants Enum Constant Both
ClosingTags
OpeningTags
-
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()
-
-
-
Enum Constant Detail
-
OpeningTags
public static final TC OpeningTags
OpeningTags indicates HTMLTagNode's
that constitute the first of a twoTagNode
pair like:<DIV>
rather than / as opposed to</DIV>
-
ClosingTags
public static final TC ClosingTags
ClosingTag indicates HTMLTagNode's
that constitute the second of the twoTagNode
pair such as:</A>
, rather than<A HREF=...>
-
-
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 namejava.lang.NullPointerException
- if the argument is null
-
-