Java Utililty Methods SortedSet Usage

List of utility methods to do SortedSet Usage

Description

The list of methods to do SortedSet Usage are organized into topic(s).

Method

StringconcatStringList(SortedSet sortedDependencies)
Concatenates a SortedSet of Strings with a semicolon between them.
String concatenatedString = "";
for (String s : sortedDependencies) {
    concatenatedString = concatenatedString.concat(s + ";");
return concatenatedString;
TfindLT(SortedSet ss, T x)
Finds the largest value that is smaller than x in a SortedSet
SortedSet<T> p = ss.headSet(x);
return p.isEmpty() ? null : p.last();
intfindPositionFor(final T item, final SortedSet values)
find Position For
final SortedSet<T> head = values.headSet(item);
return head.size();
TfirstOrNull(SortedSet set)
first Or Null
if (set == null || set.isEmpty()) {
    return null;
return set.first();
intnextValue(SortedSet valueSet, int startValue)
next Value
if (valueSet == null) {
    return startValue;
if (valueSet.contains(startValue)) {
    return startValue;
SortedSet<Integer> tailSet = valueSet.tailSet(startValue + 1);
if (tailSet.isEmpty()) {
...
booleansortedSetIsAssignableFrom(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);
SortedSetsortedSetOf(final Object obj, final Class castTo)
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;