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