Class SetUtil

Object
com.liferay.portal.kernel.util.SetUtil

public class SetUtil extends Object
Author:
Brian Wing Shun Chan
  • Constructor Details

    • SetUtil

      public SetUtil()
  • Method Details

    • asymmetricDifference

      public static <T> Set<T> asymmetricDifference(Collection<T> collection1, Collection<T> collection2)
    • fromArray

      public static Set<Boolean> fromArray(boolean[] array)
    • fromArray

      public static Set<Byte> fromArray(byte[] array)
    • fromArray

      public static Set<Character> fromArray(char[] array)
    • fromArray

      public static Set<Double> fromArray(double[] array)
    • fromArray

      public static <E> Set<E> fromArray(E... array)
    • fromArray

      public static Set<Float> fromArray(float[] array)
    • fromArray

      public static Set<Integer> fromArray(int[] array)
    • fromArray

      public static Set<Long> fromArray(long[] array)
    • fromArray

      public static Set<Short> fromArray(short[] array)
    • fromCollection

      public static <E> Set<E> fromCollection(Collection<? extends E> c)
    • fromEnumeration

      public static <E> Set<E> fromEnumeration(Enumeration<? extends E> enumeration)
    • fromFile

      public static Set<String> fromFile(File file) throws IOException
      Throws:
      IOException
    • fromFile

      public static Set<String> fromFile(String fileName) throws IOException
      Throws:
      IOException
    • fromIterator

      public static <E> Set<E> fromIterator(Iterator<E> iterator)
    • fromList

      public static <E> Set<E> fromList(List<? extends E> array)
    • fromString

      public static Set<String> fromString(String s)
    • intersect

      public static <T> Set<T> intersect(Collection<T> collection1, Collection<T> collection2)
    • intersect

      public static Set<Long> intersect(long[] array1, long[] array2)
    • isEmpty

      public static boolean isEmpty(Set<?> set)
    • isNotEmpty

      public static boolean isNotEmpty(Set<?> set)
    • randomElement

      public static <T> T randomElement(Set<T> set)
    • symmetricDifference

      public static <T> Set<T> symmetricDifference(Collection<T> collection1, Collection<T> collection2)
    • symmetricDifference

      public static Set<Long> symmetricDifference(long[] array1, long[] array2)