com.rt.storage.api.client.util.Sets Maven / Gradle / Ivy
package com.rt.storage.api.client.util;
import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;
/**
* Static utility methods pertaining to {@link Set} instances.
*
* @since 1.14
* @author Yaniv Inbar
*/
public final class Sets {
/** Returns a new mutable, empty {@code HashSet} instance. */
public static HashSet newHashSet() {
return new HashSet();
}
/**
* Returns a new mutable, empty {@code TreeSet} instance sorted by the natural sort ordering of
* its elements.
*/
public static > TreeSet newTreeSet() {
return new TreeSet();
}
private Sets() {}
}