List of usage examples for org.apache.mahout.math Arrays ensureCapacity
public static boolean[] ensureCapacity(boolean[] array, int minCapacity)
From source file:gov.vha.isaac.ochre.collections.uuidnidmap.UuidArrayList.java
License:Apache License
/** * Ensures that the receiver can hold at least the specified number of * elements without needing to allocate new internal memory. If necessary, * allocates new internal memory and increases the capacity of the receiver. * /*from w w w . j a v a 2 s .c om*/ * @param minCapacity * the desired minimum capacity. */ @Override public void ensureCapacity(int minCapacity) { elements = Arrays.ensureCapacity(elements, minCapacity); }
From source file:sh.isaac.api.collections.uuidnidmap.UuidArrayList.java
License:Apache License
/** * Ensures that the receiver can hold at least the specified number of * elements without needing to allocate new internal memory. If necessary, * allocates new internal memory and increases the capacity of the receiver. * * @param minCapacity/*from w ww . ja v a2 s . c o m*/ * the desired minimum capacity. */ @Override public void ensureCapacity(int minCapacity) { this.elements = Arrays.ensureCapacity(this.elements, minCapacity); }