List of utility methods to do SortedSet Usage
String | concatStringList(SortedSet Concatenates a SortedSet of Strings with a semicolon between them. String concatenatedString = ""; for (String s : sortedDependencies) { concatenatedString = concatenatedString.concat(s + ";"); return concatenatedString; |
T | findLT(SortedSet Finds the largest value that is smaller than x in a SortedSet SortedSet<T> p = ss.headSet(x);
return p.isEmpty() ? null : p.last();
|
int | findPositionFor(final T item, final SortedSet find Position For final SortedSet<T> head = values.headSet(item); return head.size(); |
T | firstOrNull(SortedSet first Or Null if (set == null || set.isEmpty()) { return null; return set.first(); |
int | nextValue(SortedSet next Value if (valueSet == null) { return startValue; if (valueSet.contains(startValue)) { return startValue; SortedSet<Integer> tailSet = valueSet.tailSet(startValue + 1); if (tailSet.isEmpty()) { ... |
boolean | sortedSetIsAssignableFrom(Class> aClass) Determines if the SortedSet interface is either the same as, or is a superinterface of, the class or interface represented by the specified Class parameter. return SortedSet.class.isAssignableFrom(aClass); |
SortedSet | sortedSetOf(final Object obj, final Class sorted Set Of return (SortedSet<T>) obj;
|
double[] | toDoubleArray(final int[] intArray) to Double Array final int length = intArray.length; final double[] doubleArray = new double[length]; for (int i = 0; i < intArray.length; i++) { doubleArray[i] = intArray[i]; return doubleArray; |