public class SetUtil
extends Object
Constructor and Description |
---|
SetUtil() |
Modifier and Type | Method and Description |
---|---|
static Set<Boolean> |
fromArray(boolean[] array) |
static Set<Byte> |
fromArray(byte[] array) |
static Set<Character> |
fromArray(char[] array) |
static Set<Double> |
fromArray(double[] array) |
static <E> Set<E> |
fromArray(E[] array) |
static Set<Float> |
fromArray(float[] array) |
static Set<Integer> |
fromArray(int[] array) |
static Set<Long> |
fromArray(long[] array) |
static Set<Short> |
fromArray(short[] array) |
static <E> Set<E> |
fromCollection(Collection<? extends E> c) |
static <E> Set<E> |
fromEnumeration(Enumeration<? extends E> enu) |
static Set<String> |
fromFile(File file) |
static Set<String> |
fromFile(String fileName) |
static <E> Set<E> |
fromIterator(Iterator<E> itr) |
static <E> Set<E> |
fromList(List<? extends E> array) |
static Set<String> |
fromString(String s) |
static <T> Set<T> |
intersect(Collection<T> collection1,
Collection<T> collection2) |
static Set<Long> |
intersect(long[] array1,
long[] array2) |
static boolean |
isEmpty(Set<?> set) |
static boolean |
isNotEmpty(Set<?> set) |
static <T> Set<T> |
symmetricDifference(Collection<T> collection1,
Collection<T> collection2) |
static Set<Long> |
symmetricDifference(long[] array1,
long[] array2) |
public static Set<Boolean> fromArray(boolean[] array)
public static Set<Byte> fromArray(byte[] array)
public static Set<Character> fromArray(char[] array)
public static Set<Double> fromArray(double[] array)
public static <E> Set<E> fromArray(E[] array)
public static Set<Float> fromArray(float[] array)
public static Set<Integer> fromArray(int[] array)
public static Set<Long> fromArray(long[] array)
public static Set<Short> fromArray(short[] array)
public static <E> Set<E> fromCollection(Collection<? extends E> c)
public static <E> Set<E> fromEnumeration(Enumeration<? extends E> enu)
public static Set<String> fromFile(File file) throws IOException
IOException
public static Set<String> fromFile(String fileName) throws IOException
IOException
public static <E> Set<E> fromIterator(Iterator<E> itr)
public static <E> Set<E> fromList(List<? extends E> array)
public static Set<String> fromString(String s)
public static <T> Set<T> intersect(Collection<T> collection1, Collection<T> collection2)
public static Set<Long> intersect(long[] array1, long[] array2)
public static boolean isEmpty(Set<?> set)
public static boolean isNotEmpty(Set<?> set)
public static <T> Set<T> symmetricDifference(Collection<T> collection1, Collection<T> collection2)
public static Set<Long> symmetricDifference(long[] array1, long[] array2)