1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 | package Torello.HTML.NodeSearch;
import java.util.Vector;
import java.util.function.Predicate;
import java.util.regex.Pattern;
import Torello.HTML.*;
import Torello.Java.LV;
/**
* {@code Static} methods for building and instantiating an
* {@link HNLI}<CODE><</CODE>{@link CommentNode}<CODE>></CODE> (which extends the basic
* iterator class) for iterating the comments inside of an HTML-{@code Vector}, with the help of a
* user-provided {@code String-Predicate}, Regular Expression or {@link TextComparitor} as a
* search-specifier.
*
* <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=CommentNodeIterator>
*/
@Torello.JavaDoc.Annotations.JDHeaderBackgroundImg
@Torello.JavaDoc.Annotations.StaticFunctional
public class CommentNodeIterator
{
private CommentNodeIterator() { }
public static HNLI<CommentNode> iterator (Vector<? extends HTMLNode> html, TextComparitor tc, String... compareStr)
{ return new HNLI<CommentNode> (html, ARGCHECK.TC_CNP(tc, compareStr), CommentNode.class); }
public static HNLI<CommentNode> iterator (Vector<? extends HTMLNode> html, Pattern p)
{ return new HNLI<CommentNode> (html, ARGCHECK.REGEX_CNP(p), CommentNode.class); }
public static HNLI<CommentNode> iterator (Vector<? extends HTMLNode> html, Predicate<String> p)
{ return new HNLI<CommentNode> (html, ARGCHECK.SP_TO_CNP(p), CommentNode.class); }
public static HNLI<CommentNode> exceptIterator (Vector<? extends HTMLNode> html, TextComparitor tc, String... compareStr)
{ return new HNLI<CommentNode> (html, ARGCHECK.TC_CNP(tc, compareStr).negate(), CommentNode.class); }
public static HNLI<CommentNode> exceptIterator (Vector<? extends HTMLNode> html, Pattern p)
{ return new HNLI<CommentNode> (html, ARGCHECK.REGEX_CNP(p).negate(), CommentNode.class); }
public static HNLI<CommentNode> exceptIterator (Vector<? extends HTMLNode> html, Predicate<String> p)
{ return new HNLI<CommentNode> (html, ARGCHECK.SP_TO_CNP(p).negate(), CommentNode.class); }
}
|