001package Torello.HTML.NodeSearch;
002
003import java.util.Vector;
004import java.util.regex.Pattern;
005import java.util.function.Predicate;
006
007import Torello.HTML.*;
008import Torello.HTML.NodeSearch.searchLoops.InnerTags.ITPoll;
009import Torello.Java.LV;
010
011/**
012 * Searches Vectorized-HTML for Tag-Matches by Inner-Tag (attribute) names & values, and
013 * removes and returns the {@link TagNode} when a match is found.
014 * 
015 * <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=InnerTagPoll>  
016 */
017@Torello.JavaDoc.JDHeaderBackgroundImg
018@Torello.JavaDoc.StaticFunctional
019public class InnerTagPoll
020{
021    private InnerTagPoll() { }
022
023    // ********************************************************************************************
024    // FIND-FIRST METHODS
025    // ********************************************************************************************
026
027    // **** Find-First, CRITERIA: htmlTag, sPos, ePos
028    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag)
029    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
030
031    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
032    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
033
034    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Pattern p)
035    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
036
037    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
038    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
039
040    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags)
041    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), p, ARGCHECK.htmlTags(htmlTags)); }
042
043
044    // **** Find-First, CRITERIA: htmlTag
045    public static TagNode first(Vector<? extends HTMLNode> html, String htmlTag, String innerTag)
046    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
047
048    public static TagNode first(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
049    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
050
051    public static TagNode first(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Pattern p)
052    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
053
054    public static TagNode first(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
055    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
056
057    public static TagNode first(Vector<? extends HTMLNode> html, Predicate<TagNode> p, String... htmlTags)
058    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), p, ARGCHECK.htmlTags(htmlTags)); }
059
060
061    // **** Find-First, CRITERIA: sPos, ePos
062    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag)
063    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
064
065    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr)
066    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
067
068    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Pattern p)
069    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
070
071    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred)
072    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }
073
074    public static TagNode first(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p)
075    { return ITPoll.NTH(html, 1, new LV(html, sPos, ePos), p); }
076
077
078    // **** Find-First, ALL-CRITERIA-NULL
079    public static TagNode first(Vector<? extends HTMLNode> html, String innerTag)
080    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
081
082    public static TagNode first(Vector<? extends HTMLNode> html, String innerTag, TextComparitor tc, String... compareStr)
083    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
084
085    public static TagNode first(Vector<? extends HTMLNode> html, String innerTag, Pattern p)
086    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
087
088    public static TagNode first(Vector<? extends HTMLNode> html, String innerTag, Predicate<String> attributeValuePred)
089    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }
090
091    public static TagNode first(Vector<? extends HTMLNode> html, Predicate<TagNode> p)
092    { return ITPoll.NTH(html, 1, new LV(html, 0, -1), p); }
093
094    // ********************************************************************************************
095    // FIND-NTH - METHODS
096    // ********************************************************************************************
097
098    // **** Find-Nth, CRITERIA: htmlTag, sPos, ePos
099    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag)
100    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
101
102    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
103    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
104
105    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, Pattern p)
106    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
107
108    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
109    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
110
111    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags)
112    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), p, ARGCHECK.htmlTags(htmlTags)); }
113
114
115    // **** Find-Nth, CRITERIA: htmlTag
116    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag)
117    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
118
119    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
120    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
121
122    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, Pattern p)
123    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
124
125    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
126    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
127
128    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, Predicate<TagNode> p, String... htmlTags)
129    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), p, ARGCHECK.htmlTags(htmlTags)); }
130
131
132    // **** Find-Nth, CRITERIA: sPos, ePos
133    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag)
134    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
135
136    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr)
137    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
138
139    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, Pattern p)
140    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
141
142    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred)
143    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }
144
145    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, Predicate<TagNode> p)
146    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), p); }
147
148
149    // **** Find-Nth, ALL-CRITERIA-NULL
150    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, String innerTag)
151    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
152
153    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, String innerTag, TextComparitor tc, String... compareStr)
154    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
155
156    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, String innerTag, Pattern p)
157    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
158
159    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, String innerTag, Predicate<String> attributeValuePred)
160    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }
161
162    public static TagNode nth(Vector<? extends HTMLNode> html, int nth, Predicate<TagNode> p)
163    { return ITPoll.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), p); }
164
165    // ********************************************************************************************
166    // FIND-LAST METHODS
167    // ********************************************************************************************
168
169    // **** Find-Last, CRITERIA: htmlTag, sPos, ePos
170    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag)
171    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
172
173    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
174    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
175
176    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Pattern p)
177    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
178
179    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
180    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
181
182    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags)
183    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), p, ARGCHECK.htmlTags(htmlTags)); }
184
185
186    // **** Find-Last, CRITERIA: htmlTag
187    public static TagNode last(Vector<? extends HTMLNode> html, String htmlTag, String innerTag)
188    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
189
190    public static TagNode last(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
191    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
192
193    public static TagNode last(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Pattern p)
194    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
195
196    public static TagNode last(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
197    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
198
199    public static TagNode last(Vector<? extends HTMLNode> html, Predicate<TagNode> p, String... htmlTags)
200    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), p, ARGCHECK.htmlTags(htmlTags)); }
201
202
203    // **** Find-Last, CRITERIA: sPos, ePos
204    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag)
205    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
206
207    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr)
208    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
209
210    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Pattern p)
211    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
212
213    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred)
214    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }
215
216    public static TagNode last(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p)
217    { return ITPoll.NTHFE(html, 1, new LV(html, sPos, ePos), p); }
218
219
220    // **** Find-Last, ALL-CRITERIA-NULL
221    public static TagNode last(Vector<? extends HTMLNode> html, String innerTag)
222    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
223
224    public static TagNode last(Vector<? extends HTMLNode> html, String innerTag, TextComparitor tc, String... compareStr)
225    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
226
227    public static TagNode last(Vector<? extends HTMLNode> html, String innerTag, Pattern p)
228    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
229
230    public static TagNode last(Vector<? extends HTMLNode> html, String innerTag, Predicate<String> attributeValuePred)
231    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }   
232
233    public static TagNode last(Vector<? extends HTMLNode> html, Predicate<TagNode> p)
234    { return ITPoll.NTHFE(html, 1, new LV(html, 0, -1), p); }   
235
236
237    // ********************************************************************************************
238    // FIND-NTH-FROM-END METHODS
239    // ********************************************************************************************
240
241    // **** Find-Nth-From-End, CRITERIA: htmlTag, sPos, ePos
242    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag)
243    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
244
245    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
246    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
247
248    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, Pattern p)
249    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
250
251    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
252    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
253
254    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags)
255    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), p, ARGCHECK.htmlTags(htmlTags)); }
256
257
258    // **** Find-Nth-From-End, CRITERIA: htmlTag
259    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag)
260    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
261
262    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
263    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
264
265    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, Pattern p)
266    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
267
268    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
269    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
270
271    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, Predicate<TagNode> p, String... htmlTags)
272    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), p, ARGCHECK.htmlTags(htmlTags)); }
273
274
275    // **** Find-Nth-From-End, CRITERIA: sPos, ePos
276    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag)
277    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
278
279    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr)
280    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
281
282    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, Pattern p)
283    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
284
285    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred)
286    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }
287
288    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, Predicate<TagNode> p)
289    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), p); }
290
291
292    // **** Find-Nth-From-End, ALL-CRITERIA-NULL
293    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, String innerTag)
294    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
295
296    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, String innerTag, TextComparitor tc, String... compareStr)
297    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
298
299    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, String innerTag, Pattern p)
300    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
301
302    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, String innerTag, Predicate<String> attributeValuePred)
303    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }   
304
305    public static TagNode nthFromEnd(Vector<? extends HTMLNode> html, int nth, Predicate<TagNode> p)
306    { return ITPoll.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), p); }   
307
308    // ********************************************************************************************
309    // FIND-ALL METHODS
310    // ********************************************************************************************
311
312    // **** Find-First, CRITERIA: htmlTag, sPos, ePos
313    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag)
314    { return ITPoll.ALL(html, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
315
316    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
317    { return ITPoll.ALL(html, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
318
319    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Pattern p)
320    { return ITPoll.ALL(html, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
321
322    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
323    { return ITPoll.ALL(html, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
324
325    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags)
326    { return ITPoll.ALL(html, new LV(html, sPos, ePos), p, ARGCHECK.htmlTags(htmlTags)); }
327
328
329    // **** Find-All, CRITERIA: htmlTag
330    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, String htmlTag, String innerTag)
331    { return ITPoll.ALL(html, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
332
333    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, TextComparitor tc, String... compareStr)
334    { return ITPoll.ALL(html, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
335
336    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Pattern p)
337    { return ITPoll.ALL(html, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
338
339    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Predicate<String> attributeValuePred)
340    { return ITPoll.ALL(html, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); }
341
342    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, Predicate<TagNode> p, String... htmlTags)
343    { return ITPoll.ALL(html, new LV(html, 0, -1), p, ARGCHECK.htmlTags(htmlTags)); }
344
345
346    // **** Find-First, CRITERIA: sPos, ePos
347    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag)
348    { return ITPoll.ALL(html, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
349
350    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr)
351    { return ITPoll.ALL(html, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
352
353    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Pattern p)
354    { return ITPoll.ALL(html, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
355
356    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred)
357    { return ITPoll.ALL(html, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }
358
359    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p)
360    { return ITPoll.ALL(html, new LV(html, sPos, ePos), p); }
361
362
363    // **** Find-All, ALL-CRITERIA-NULL
364    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, String innerTag)
365    { return ITPoll.ALL(html, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); }
366
367    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, String innerTag, TextComparitor tc, String... compareStr)
368    { return ITPoll.ALL(html, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); }
369
370    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, String innerTag, Pattern p)
371    { return ITPoll.ALL(html, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); }
372
373    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, String innerTag, Predicate<String> attributeValuePred)
374    { return ITPoll.ALL(html, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); }
375
376    public static Vector<TagNode> all(Vector<? extends HTMLNode> html, Predicate<TagNode> p)
377    { return ITPoll.ALL(html, new LV(html, 0, -1), p); }
378}