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 | package Torello.HTML.NodeSearch;
import java.util.*;
import Torello.HTML.*;
import Torello.Java.LV;
/**
* {@code Static} methods for building and instantiating an
* {@link HNLI}<CODE><</CODE>{@link TagNode}<CODE>></CODE> (which extends the basic
* iterator class) for iterating the tags inside of an HTML-{@code Vector}, using
* explicitly provided match-specifications.
*
* <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=TagNodeIterator>
*/
@Torello.JavaDoc.Annotations.JDHeaderBackgroundImg
@Torello.JavaDoc.Annotations.StaticFunctional
public class TagNodeIterator
{
private TagNodeIterator() { }
public static HNLI<TagNode> iter (Vector<? extends HTMLNode> html, TC tagCriteria, String... htmlTags)
{
final String[] checkedHTMLTags = ARGCHECK.htmlTags(htmlTags);
return new HNLI<TagNode>
(html, tagNode -> tagNode.isTag(tagCriteria, checkedHTMLTags), TagNode.class);
}
public static HNLI<TagNode> exceptIter (Vector<? extends HTMLNode> html, TC tagCriteria, String... htmlTags)
{
final String[] checkedHTMLTags = ARGCHECK.htmlTags(htmlTags);
return new HNLI<TagNode>
(html, tagNode -> tagNode.isTagExcept(tagCriteria, htmlTags), TagNode.class);
}
}
|