Example usage for org.apache.lucene.util ArrayUtil grow

List of usage examples for org.apache.lucene.util ArrayUtil grow

Introduction

In this page you can find the example usage for org.apache.lucene.util ArrayUtil grow.

Prototype

public static char[] grow(char[] array) 

Source Link

Document

Returns a larger array, generally over-allocating exponentially

Usage

From source file:org.elasticsearch.index.fielddata.util.IntArrayRef.java

License:Apache License

public void growIfNeeded(int index) {
    if (index >= values.length) {
        values = ArrayUtil.grow(values);
    }
}