Example usage for org.apache.lucene.util FixedBitSet hashCode

List of usage examples for org.apache.lucene.util FixedBitSet hashCode

Introduction

In this page you can find the example usage for org.apache.lucene.util FixedBitSet hashCode.

Prototype

@Override
    public int hashCode() 

Source Link

Usage

From source file:DocIdSetBenchmark.java

License:Apache License

public static long scoreBuildFixedBitSet(DocIdSet set, int maxDoc) throws IOException {
    final long start = System.nanoTime();
    int dummy = 0;
    long score = 0;
    while (System.nanoTime() - start < SECOND) {
        final FixedBitSet copy = new FixedBitSet(maxDoc);
        DocIdSetIterator iterator = set.iterator();
        if (iterator != null) {
            copy.or(iterator);/*from   www  .ja  v a 2s  .com*/
        }
        dummy += copy.hashCode();
        ++score;
    }
    DUMMY += dummy;
    return score;
}