List of utility methods to do List First Item
List | getFirstRowResults(List
Gets the first row results. if (llo.size() < 1) throw new RuntimeException("Insufficient row results, " + reason); return llo.get(0); |
String | getFirstString(Object list) unqualify given dateVal. if (list == null) { return null; if (list instanceof List) { return ((List) list).size() == 0 ? null : (String) ((List) list).get(0); Class<?> arrType = list.getClass().getComponentType(); if ((arrType != null) && arrType.isPrimitive()) { ... |
String | getFirstValueString(List get First Value String if (values.isEmpty()) { return null; Object first = values.get(0); return first != null ? first.toString() : null; |
String | getFirstValueString(List Gets the first value of the given list of values. if ((values != null) && !values.isEmpty()) { return values.get(0); return null; |
int | getIndexOfFirstMatchingProperty(List propertyNames, String follower) get Index Of First Matching Property int propertySize = propertyNames.size(); for (int propIndex = 0; propIndex < propertySize; propIndex++) { if (((String) propertyNames.get(propIndex)).startsWith(follower)) { return propIndex; return -1; |
List | getListBetween(String inputStr, String first, String second, List get List Between String str = inputStr; int idx = str.indexOf(first); while (idx > 0) { list.add(getStringBetween(str, first, second)); str = str.substring(idx + first.length()); idx = str.indexOf(first); return list; ... |
byte[] | getNFirstBytes(int n, List get N First Bytes List<Byte> nFirstByteList = byteList.subList(0, n); byte[] nFirstBytes = new byte[n]; for (int i = 0; i < nFirstByteList.size(); i++) { nFirstBytes[i] = nFirstByteList.get(i); return nFirstBytes; |
Object | getOnlyFirst(List> obj) get Only First if (obj.size() == 1) { return obj.get(0); } else { return null; |
List | getPage(List get Page int last = first + pageSize; if (last > all.size()) { last = all.size(); return all.subList(first, last); |
String | getStringFirstResult(List
Gets the string first result. Object o = getNthResult(llo, 0, reason); if (!(o instanceof String)) throw new RuntimeException("Result not String, " + reason); return (String) getNthResult(llo, 0, reason); |