Example usage for org.apache.lucene.util LongBitSet ensureCapacity

List of usage examples for org.apache.lucene.util LongBitSet ensureCapacity

Introduction

In this page you can find the example usage for org.apache.lucene.util LongBitSet ensureCapacity.

Prototype

public static LongBitSet ensureCapacity(LongBitSet bits, long numBits) 

Source Link

Document

If the given LongBitSet is large enough to hold numBits+1 , returns the given bits, otherwise returns a new LongBitSet which can hold the requested number of bits.

Usage

From source file:io.crate.data.join.LuceneLongBitSetWrapper.java

License:Apache License

void set(long idx) {
    if (idx >= size) {
        size *= 2;
        bitSet = LongBitSet.ensureCapacity(bitSet, size);
    }
    bitSet.set(idx);
}

From source file:org.alfresco.solr.adapters.SolrOpenBitSetAdapter.java

License:Open Source License

@Override
public void set(long index) {
    delegate = LongBitSet.ensureCapacity(delegate, index);
    delegate.set(index);
}