List of utility methods to do Collection Min
T | min(Collection min T min = null; Iterator<T> it = values.iterator(); if (it.hasNext()) { min = it.next(); while (it.hasNext()) { T n = it.next(); if (n.compareTo(min) < 0) { min = n; ... |
T | min(final Collection min if (collection == null || collection.size() <= 0) { return null; T max = null; for (final T elem : collection) { if (max == null || elem.compareTo(max) < 0) { max = elem; return max; |
Integer | minI(Collection min I if (col.isEmpty()) { return null; int min = Integer.MAX_VALUE; for (Integer integer : col) { if (integer < min) { min = integer; return min; |
int | minInt(Collection find the min integer int ret = Integer.MAX_VALUE; for (int i : ints) if (i < ret) ret = i; return ret; |
int | minKmerLength(final Collection Get the minimum length of a collection of byte[] if (kmers == null) throw new IllegalArgumentException("kmers cannot be null"); if (kmers.isEmpty()) return 0; int min = Integer.MAX_VALUE; for (final byte[] kmer : kmers) { min = Math.min(min, kmer.length); return min; |
T | minOr(Collection Like Collections#min(java.util.Collection) except with a default value returned in the case of an empty collection. if (values.isEmpty()) { return defaultVal; } else { return Collections.min(values); |