Example usage for org.apache.mahout.math Arrays ensureCapacity

List of usage examples for org.apache.mahout.math Arrays ensureCapacity

Introduction

In this page you can find the example usage for org.apache.mahout.math Arrays ensureCapacity.

Prototype

public static boolean[] ensureCapacity(boolean[] array, int minCapacity) 

Source Link

Document

Ensures that a given array can hold up to minCapacity elements.

Usage

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);
}