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.ITFind; 009import Torello.Java.LV; 010 011/** 012 * Searches Vectorized-HTML for Tag-Matches by Inner-Tag (attribute) name & value, and 013 * returns the indices into the {@code Vector} that identify where those matches were found. 014 * 015 * <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=InnerTagFind> 016 */ 017@Torello.JavaDoc.JDHeaderBackgroundImg 018@Torello.JavaDoc.StaticFunctional 019public class InnerTagFind 020{ 021 private InnerTagFind() { } 022 023 // ******************************************************************************************** 024 // FIND-FIRST METHODS 025 // ******************************************************************************************** 026 027 // **** Find-First, CRITERIA: htmlTag, sPos, ePos 028 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag) 029 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 030 031 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 032 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 033 034 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Pattern p) 035 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 036 037 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 038 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 039 040 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags) 041 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), p, ARGCHECK.htmlTags(htmlTags)); } 042 043 044 // **** Find-First, CRITERIA: htmlTag 045 public static int first(Vector<? extends HTMLNode> html, String htmlTag, String innerTag) 046 { return ITFind.NTH(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 047 048 public static int first(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 049 { return ITFind.NTH(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 050 051 public static int first(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Pattern p) 052 { return ITFind.NTH(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 053 054 public static int first(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 055 { return ITFind.NTH(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 056 057 public static int first(Vector<? extends HTMLNode> html, Predicate<TagNode> p, String... htmlTags) 058 { return ITFind.NTH(html, 1, new LV(html, 0, -1), p, ARGCHECK.htmlTags(htmlTags)); } 059 060 061 // **** Find-First, CRITERIA: sPos, ePos 062 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag) 063 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 064 065 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr) 066 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 067 068 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Pattern p) 069 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 070 071 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred) 072 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 073 074 public static int first(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p) 075 { return ITFind.NTH(html, 1, new LV(html, sPos, ePos), p); } 076 077 078 // **** Find-First, ALL-CRITERIA-NULL 079 public static int first(Vector<? extends HTMLNode> html, String innerTag) 080 { return ITFind.NTH(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 081 082 public static int first(Vector<? extends HTMLNode> html, String innerTag, TextComparitor tc, String... compareStr) 083 { return ITFind.NTH(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 084 085 public static int first(Vector<? extends HTMLNode> html, String innerTag, Pattern p) 086 { return ITFind.NTH(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 087 088 public static int first(Vector<? extends HTMLNode> html, String innerTag, Predicate<String> attributeValuePred) 089 { return ITFind.NTH(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 090 091 public static int first(Vector<? extends HTMLNode> html, Predicate<TagNode> p) 092 { return ITFind.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 int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag) 100 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 101 102 public static int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 103 { return ITFind.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 int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, Pattern p) 106 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 107 108 public static int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 109 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 110 111 public static int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags) 112 { return ITFind.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 int nth(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag) 117 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 118 119 public static int nth(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 120 { return ITFind.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 int nth(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, Pattern p) 123 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 124 125 public static int nth(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 126 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 127 128 public static int nth(Vector<? extends HTMLNode> html, int nth, Predicate<TagNode> p, String... htmlTags) 129 { return ITFind.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 int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag) 134 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 135 136 public static int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr) 137 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 138 139 public static int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, Pattern p) 140 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 141 142 public static int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred) 143 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 144 145 public static int nth(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, Predicate<TagNode> p) 146 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), p); } 147 148 149 // **** Find-Nth, ALL-CRITERIA-NULL 150 public static int nth(Vector<? extends HTMLNode> html, int nth, String innerTag) 151 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 152 153 public static int nth(Vector<? extends HTMLNode> html, int nth, String innerTag, TextComparitor tc, String... compareStr) 154 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 155 156 public static int nth(Vector<? extends HTMLNode> html, int nth, String innerTag, Pattern p) 157 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 158 159 public static int nth(Vector<? extends HTMLNode> html, int nth, String innerTag, Predicate<String> attributeValuePred) 160 { return ITFind.NTH(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 161 162 public static int nth(Vector<? extends HTMLNode> html, int nth, Predicate<TagNode> p) 163 { return ITFind.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 int last(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag) 171 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 172 173 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 174 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 175 176 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Pattern p) 177 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 178 179 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 180 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 181 182 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags) 183 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), p, ARGCHECK.htmlTags(htmlTags)); } 184 185 186 // **** Find-Last, CRITERIA: htmlTag 187 public static int last(Vector<? extends HTMLNode> html, String htmlTag, String innerTag) 188 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 189 190 public static int last(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 191 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 192 193 public static int last(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Pattern p) 194 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 195 196 public static int last(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 197 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 198 199 public static int last(Vector<? extends HTMLNode> html, Predicate<TagNode> p, String... htmlTags) 200 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), p, ARGCHECK.htmlTags(htmlTags)); } 201 202 203 // **** Find-Last, CRITERIA: sPos, ePos 204 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag) 205 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 206 207 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr) 208 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 209 210 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Pattern p) 211 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 212 213 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred) 214 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 215 216 public static int last(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p) 217 { return ITFind.NTHFE(html, 1, new LV(html, sPos, ePos), p); } 218 219 220 // **** Find-Last, ALL-CRITERIA-NULL 221 public static int last(Vector<? extends HTMLNode> html, String innerTag) 222 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 223 224 public static int last(Vector<? extends HTMLNode> html, String innerTag, TextComparitor tc, String... compareStr) 225 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 226 227 public static int last(Vector<? extends HTMLNode> html, String innerTag, Pattern p) 228 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 229 230 public static int last(Vector<? extends HTMLNode> html, String innerTag, Predicate<String> attributeValuePred) 231 { return ITFind.NTHFE(html, 1, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 232 233 public static int last(Vector<? extends HTMLNode> html, Predicate<TagNode> p) 234 { return ITFind.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 int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag) 243 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 244 245 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 246 { return ITFind.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 int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, Pattern p) 249 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 250 251 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 252 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 253 254 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags) 255 { return ITFind.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 int nthFromEnd(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag) 260 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 261 262 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 263 { return ITFind.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 int nthFromEnd(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, Pattern p) 266 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 267 268 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 269 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 270 271 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, Predicate<TagNode> p, String... htmlTags) 272 { return ITFind.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 int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag) 277 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 278 279 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr) 280 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 281 282 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, Pattern p) 283 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 284 285 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred) 286 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 287 288 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, int sPos, int ePos, Predicate<TagNode> p) 289 { return ITFind.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 int nthFromEnd(Vector<? extends HTMLNode> html, int nth, String innerTag) 294 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 295 296 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, String innerTag, TextComparitor tc, String... compareStr) 297 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 298 299 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, String innerTag, Pattern p) 300 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 301 302 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, String innerTag, Predicate<String> attributeValuePred) 303 { return ITFind.NTHFE(html, ARGCHECK.n(nth, html), new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 304 305 public static int nthFromEnd(Vector<? extends HTMLNode> html, int nth, Predicate<TagNode> p) 306 { return ITFind.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 int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag) 314 { return ITFind.ALL(html, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 315 316 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 317 { return ITFind.ALL(html, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 318 319 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Pattern p) 320 { return ITFind.ALL(html, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 321 322 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 323 { return ITFind.ALL(html, new LV(html, sPos, ePos), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 324 325 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p, String... htmlTags) 326 { return ITFind.ALL(html, new LV(html, sPos, ePos), p, ARGCHECK.htmlTags(htmlTags)); } 327 328 329 // **** Find-All, CRITERIA: htmlTag 330 public static int[] all(Vector<? extends HTMLNode> html, String htmlTag, String innerTag) 331 { return ITFind.ALL(html, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 332 333 public static int[] all(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, TextComparitor tc, String... compareStr) 334 { return ITFind.ALL(html, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 335 336 public static int[] all(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Pattern p) 337 { return ITFind.ALL(html, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 338 339 public static int[] all(Vector<? extends HTMLNode> html, String htmlTag, String innerTag, Predicate<String> attributeValuePred) 340 { return ITFind.ALL(html, new LV(html, 0, -1), ARGCHECK.htmlTag(htmlTag), ARGCHECK.innerTag(innerTag), attributeValuePred); } 341 342 public static int[] all(Vector<? extends HTMLNode> html, Predicate<TagNode> p, String... htmlTags) 343 { return ITFind.ALL(html, new LV(html, 0, -1), p, ARGCHECK.htmlTags(htmlTags)); } 344 345 346 // **** Find-First, CRITERIA: sPos, ePos 347 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag) 348 { return ITFind.ALL(html, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 349 350 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, TextComparitor tc, String... compareStr) 351 { return ITFind.ALL(html, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 352 353 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Pattern p) 354 { return ITFind.ALL(html, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 355 356 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, String innerTag, Predicate<String> attributeValuePred) 357 { return ITFind.ALL(html, new LV(html, sPos, ePos), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 358 359 public static int[] all(Vector<? extends HTMLNode> html, int sPos, int ePos, Predicate<TagNode> p) 360 { return ITFind.ALL(html, new LV(html, sPos, ePos), p); } 361 362 363 // **** Find-All, ALL-CRITERIA-NULL 364 public static int[] all(Vector<? extends HTMLNode> html, String innerTag) 365 { return ITFind.ALL(html, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TRUE); } 366 367 public static int[] all(Vector<? extends HTMLNode> html, String innerTag, TextComparitor tc, String... compareStr) 368 { return ITFind.ALL(html, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.TC(tc, compareStr)); } 369 370 public static int[] all(Vector<? extends HTMLNode> html, String innerTag, Pattern p) 371 { return ITFind.ALL(html, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), ARGCHECK.REGEX(p)); } 372 373 public static int[] all(Vector<? extends HTMLNode> html, String innerTag, Predicate<String> attributeValuePred) 374 { return ITFind.ALL(html, new LV(html, 0, -1), null, ARGCHECK.innerTag(innerTag), attributeValuePred); } 375 376 public static int[] all(Vector<? extends HTMLNode> html, Predicate<TagNode> p) 377 { return ITFind.ALL(html, new LV(html, 0, -1), p); } 378}