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 | package Torello.HTML.NodeSearch;
import java.util.*;
import Torello.HTML.*;
import Torello.Java.LV;
/**
* {@code Static} methods for building an {@link HNLIInclusive} (which also extends the basic
* {@code Iterator}) for retrieving sub HTML-Vector's via user-provided match-critera that specify
* the HTML Tag-Name..
*
* <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=TagNodeInclusiveIterator>
*/
@Torello.JavaDoc.Annotations.JDHeaderBackgroundImg
@Torello.JavaDoc.Annotations.StaticFunctional
public class TagNodeInclusiveIterator
{
private TagNodeInclusiveIterator() { }
public static HNLIInclusive iter (Vector<? extends HTMLNode> html, String... htmlTags)
{
final String[] checkedHTMLTags = ARGCHECK.htmlTags(htmlTags);
InclusiveException.check(htmlTags);
return new HNLIInclusive(html, (TagNode tn) -> tn.isTag(TC.OpeningTags, checkedHTMLTags));
}
public static HNLIInclusive exceptIter (Vector<? extends HTMLNode> html, String... htmlTags)
{
final String[] checkedHTMLTags = ARGCHECK.htmlTags(htmlTags);
InclusiveException.check(htmlTags);
return new HNLIInclusive(html, (TagNode tn) -> tn.isTagExcept(TC.OpeningTags, checkedHTMLTags));
}
}
|