List of utility methods to do List First Item
List | first_nItems(int n, Collection firsn Items if (n >= fromList.size()) return new ArrayList<T>(fromList); return (new ArrayList<T>(fromList)).subList(0, n); |
Boolean | firstBoolean(List list) first Boolean A a = first(list); if (a == null) { return null; if (a instanceof Boolean) { return (Boolean) a; try { ... |
boolean | firstColumnRemovable(List first Column Removable boolean allEmpty = true; for (String s : data) { if (s.length() == 0) { continue; allEmpty = false; final char c = s.charAt(0); if (c != ' ' && c != '\t') { ... |
E | firstElement(List Returns the first element of the given List . int index = 0; return elementAt(list, index); |
T | firstItem(Iterable Provides the first item of the given list. if (list != null) { Iterator<T> i = list.iterator(); if (i.hasNext()) { return i.next(); return null; |
T | firstItem(List first Item if (items == null) { return null; Iterator<T> iterator = items.iterator(); if (iterator.hasNext()) { return iterator.next(); return null; ... |
String | firstMatch(List first Match if (lookup == null) { return null; Arrays.sort(lookup); for (String s : src) { int matchedIndex = Arrays.binarySearch(lookup, s); if (matchedIndex >= 0) { return lookup[matchedIndex]; ... |
Object | firstObjectFromList(List list) first Object From List Object result = null; if (list != null && list.size() > 0) { result = list.get(0); return result; |
T | firstOrDefault(List first Or Default if (items.size() < 1) return null; return items.get(0); |
String | firstStartsWith(List return first line that starts with prefix, null otherwise for (String l : lines) { if (l.startsWith(startsWith)) { return l; return null; |