List of utility methods to do List IndexOf
int | indexOf(final String regex, final List Gets the index of the first occurrence of the given regex. assert regex != null : "Regex cannot be null!"; assert list != null : "List cannot be null!"; for (int i = 0; i < list.size(); i++) { if (list.get(i).matches(regex)) { return i; return -1; ... |
int | indexOf(int hash, List> list) Gets the index of the item occurrence matching the specified hashcode. Iterator<?> iterator = list.iterator(); for (int i = 0; iterator.hasNext(); i++) { if (iterator.next().hashCode() == hash) { return i; return -1; |
int | indexOf(int start, List index Of int index = -1; for (int i = start; i < datas.size(); i++) { if (datas.get(i).equals(target)) { index = i; break; return index; ... |
int | indexOf(List> list, Object element, int begin, int end) index Of begin = Math.min(begin, list.size()); end = Math.min(end, list.size()); if (begin == 0 && end == list.size()) return list.indexOf(element); for (int i = begin; i < end; i++) { if (Objects.equals(element, list.get(i))) return i; return -1; |
int | indexOf(List Return the index of first occuernce of token in data. int result = -1; if (data.size() > token.size()) { List<Byte> aux; for (int i = 0; i <= data.size() - token.size(); i++) { aux = data.subList(i, i + token.size()); if (aux.equals(token)) return i; return result; |
int | indexOf(List index Of return indexOf(source, target, 0);
|
int | indexOf(List index Of int i = 0; for (String line : lines) { if (matchLine(line, conditions)) return i; i++; return -1; |
int | indexOf(List A List#indexOf(Object) which begins the search at a particular index. for (int i = beginIndex; i < list.size(); i++) { if (string.equals(list.get(i))) { return i; return -1; |
int | indexOf(Object o, Collection list) get an index of object in the collection. int n = 1; for (Object oo : list) { if (oo.equals(0)) { return n; n++; return -1; ... |
int | indexOfFactory(List> factories, Class> classInstance) Returns the index of the factory with the given class in the List . int result = -1; Iterator<?> iter = factories.iterator(); int i = 0; while (result < 0 && iter.hasNext()) { if (classInstance.equals(iter.next().getClass())) { result = i; i++; ... |