All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.container.map.SortedSets Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
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);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy