List of utility methods to do Collection Find
Class> | findClass(String name, Collection find Class Class<?> clazz = null; for (String imp : availableImports) { if (imp.endsWith(".*")) { imp = imp.substring(0, imp.length() - 2); String className = imp.endsWith(name) ? imp : imp + "." + name; clazz = findClass(className, cl); if (clazz != null) { ... |
Class> | findCommonElementType(Collection collection) find Common Element Type if (isEmpty(collection)) { return null; } else { Class candidate = null; Iterator i$ = collection.iterator(); while (i$.hasNext()) { Object val = i$.next(); if (val != null) { ... |
Class> | findCommonElementType(Collection collection) find Common Element Type if (isEmpty(collection)) { return null; Class<?> candidate = null; for (Object val : collection) { if (val != null) { if (candidate == null) { candidate = val.getClass(); ... |
Class> | findCommonElementType(Collection> collection) Find the common element type of the given Collection, if any. if (isEmpty(collection)) { return null; Class<?> candidate = null; for (Object val : collection) { if (val != null) { if (candidate == null) { candidate = val.getClass(); ... |
Class> | findCommonElementType(Collection> collection) find Common Element Type if (isEmpty(collection)) { return null; Class<?> candidate = null; for (Object val : collection) { if (val != null) { if (candidate == null) { candidate = val.getClass(); ... |
double | findMax(Collection find Max double max = Double.MIN_VALUE; for (double d : vals) { if (d > max) max = d; return max; |
double | findMax(Collection find Max double max = Double.MIN_VALUE; for (double d : vals) { if (d > max) max = d; return max; |
T | findMax(Iterable find Max T max = null; Iterator<T> it = collection.iterator(); while (it.hasNext()) { T obj = it.next(); if (null == max || max.compareTo(obj) < 0) { max = obj; return max; |
T | findValueOfType(Collection> collection, Class Find a single value of the given type in the given Collection. if (isEmpty(collection)) { return null; T value = null; for (Object element : collection) { if (type == null || type.isInstance(element)) { if (value != null) { return null; ... |
T | findValueOfType(Collection> collection, Class Find a single value of the given type in the given Collection. if (isEmpty(collection)) { return null; T value = null; for (Object element : collection) { if (type == null || type.isInstance(element)) { if (value != null) { return null; ... |