java.lang.Object
net.i2p.router.crypto.ratchet.ArrayUtils

class ArrayUtilsextends Object
Utility methods for creating unpadded arrays with optimal growth sizing.
  • Constructor Details

    • ArrayUtils

      private ArrayUtils()
      Utility class, not intended for instantiation.
  • Method Details

    • newUnpaddedCharArray

      public static char[] newUnpaddedCharArray(int minLen)
      Return a new char array of the specified minimum length.
      Parameters:
      minLen - the minimum length
      Returns:
      the new array
    • newUnpaddedObjectArray

      public static Object[] newUnpaddedObjectArray(int minLen)
      Return a new Object array of the specified minimum length.
      Parameters:
      minLen - the minimum length
      Returns:
      the new array
    • newUnpaddedArray

      public static <T> T[] newUnpaddedArray(Class<T> clazz, int minLen)
      Return a new typed array of the specified minimum length.
      Type Parameters:
      T - the component type
      Parameters:
      clazz - the class of the component type
      minLen - the minimum length
      Returns:
      the new array