com.softicar.platform.common.container.map.SortedSets Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.container.map;
import com.softicar.platform.common.container.collection.CollectionUtils;
import java.util.Collection;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.function.Function;
/**
* Utility methods for {@link SortedSet}.
*
* @author Oliver Richers
*/
public class SortedSets {
/**
* Converts the values in the given input collection.
*
* @param input
* the input collection
* @param converter
* the converter function
* @return a new {@link SortedSet} will all the converted values
*/
public static > SortedSet convertToSortedSet(Collection input, Function converter) {
return CollectionUtils.convert(input, converter, TreeSet::new);
}
}