Class CollectionUtil

java.lang.Object
io.deephaven.enterprise.util.CollectionUtil

public class CollectionUtil extends Object
Utility methods for creating collections.
  • Field Details

    • ZERO_LENGTH_BYTE_ARRAY

      public static final byte[] ZERO_LENGTH_BYTE_ARRAY
    • ZERO_LENGTH_SHORT_ARRAY

      public static final short[] ZERO_LENGTH_SHORT_ARRAY
    • ZERO_LENGTH_INT_ARRAY

      public static final int[] ZERO_LENGTH_INT_ARRAY
    • ZERO_LENGTH_INT_ARRAY_ARRAY

      public static final int[][] ZERO_LENGTH_INT_ARRAY_ARRAY
    • ZERO_LENGTH_LONG_ARRAY

      public static final long[] ZERO_LENGTH_LONG_ARRAY
    • ZERO_LENGTH_FLOAT_ARRAY

      public static final float[] ZERO_LENGTH_FLOAT_ARRAY
    • ZERO_LENGTH_DOUBLE_ARRAY

      public static final double[] ZERO_LENGTH_DOUBLE_ARRAY
    • ZERO_LENGTH_DOUBLE_ARRAY_ARRAY

      public static final double[][] ZERO_LENGTH_DOUBLE_ARRAY_ARRAY
    • ZERO_LENGTH_OBJECT_ARRAY

      public static final Object[] ZERO_LENGTH_OBJECT_ARRAY
    • ZERO_LENGTH_STRING_ARRAY

      public static final String[] ZERO_LENGTH_STRING_ARRAY
    • ZERO_LENGTH_STRING_ARRAY_ARRAY

      public static final String[][] ZERO_LENGTH_STRING_ARRAY_ARRAY
    • UNIVERSAL_SET

      public static final Set UNIVERSAL_SET
      The universal set (immutable). This set is serializable.
  • Constructor Details

    • CollectionUtil

      public CollectionUtil()
  • Method Details

    • mapFromArray

      public static <K, V> Map<K,V> mapFromArray(Class<K> typeK, Class<V> typeV, Object... data)
    • mapFromArray

      public static <K, V> Map<K,V> mapFromArray(@NotNull Class<K> typeK, @NotNull Class<V> typeV, boolean allowDuplicateKeys, @NotNull Object... data)
    • setFromArray

      public static <E> Set<E> setFromArray(@NotNull E... data)
    • newSizedLinkedHashMap

      public static <K, V> Map<K,V> newSizedLinkedHashMap(int nEntries)
      Returns an empty LinkedHashMap with a big enough capacity such that the given number of entries can be added without resizing.
    • newSizedLinkedHashSet

      public static <E> Set<E> newSizedLinkedHashSet(int nEntries)
      Returns an empty LinkedHashSet with a big enough capacity such that the given number of entries can be added without resizing.
    • universalSet

      public static <T> Set<T> universalSet()
      Returns the universal set (immutable). This set is serializable.