java.lang.Object
net.i2p.router.crypto.ratchet.ArrayUtils
Utility methods for creating unpadded arrays with optimal growth sizing.
Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionstatic <T> T[]newUnpaddedArray(Class<T> clazz, int minLen) Return a new typed array of the specified minimum length.static char[]newUnpaddedCharArray(int minLen) Return a new char array of the specified minimum length.static Object[]newUnpaddedObjectArray(int minLen) Return a new Object array of the specified minimum length.
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
Return a new Object array of the specified minimum length.- Parameters:
minLen- the minimum length- Returns:
- the new array
newUnpaddedArray
Return a new typed array of the specified minimum length.- Type Parameters:
T- the component type- Parameters:
clazz- the class of the component typeminLen- the minimum length- Returns:
- the new array