org.apache.lucene.util.packed
Class PackedInts.Mutable

java.lang.Object
  extended by org.apache.lucene.index.NumericDocValues
      extended by org.apache.lucene.util.packed.PackedInts.Reader
          extended by org.apache.lucene.util.packed.PackedInts.Mutable
Direct Known Subclasses:
GrowableWriter
Enclosing class:
PackedInts

public abstract static class PackedInts.Mutable
extends PackedInts.Reader

A packed integer array that can be modified.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
 
Fields inherited from class org.apache.lucene.index.NumericDocValues
EMPTY
 
Constructor Summary
PackedInts.Mutable()
           
 
Method Summary
 void clear()
          Sets all values to 0.
 void fill(int fromIndex, int toIndex, long val)
          Fill the mutable from fromIndex (inclusive) to toIndex (exclusive) with val.
 void save(DataOutput out)
          Save this mutable into out.
abstract  void set(int index, long value)
          Set the value at the given index in the array.
 int set(int index, long[] arr, int off, int len)
          Bulk set: set at least one and at most len longs starting at off in arr into this mutable, starting at index.
 
Methods inherited from class org.apache.lucene.util.packed.PackedInts.Reader
get, getArray, getBitsPerValue, hasArray, ramBytesUsed, size
 
Methods inherited from class org.apache.lucene.index.NumericDocValues
get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackedInts.Mutable

public PackedInts.Mutable()
Method Detail

set

public abstract void set(int index,
                         long value)
Set the value at the given index in the array.

Parameters:
index - where the value should be positioned.
value - a value conforming to the constraints set by the array.

set

public int set(int index,
               long[] arr,
               int off,
               int len)
Bulk set: set at least one and at most len longs starting at off in arr into this mutable, starting at index. Returns the actual number of values that have been set.


fill

public void fill(int fromIndex,
                 int toIndex,
                 long val)
Fill the mutable from fromIndex (inclusive) to toIndex (exclusive) with val.


clear

public void clear()
Sets all values to 0.


save

public void save(DataOutput out)
          throws IOException
Save this mutable into out. Instantiating a reader from the generated data will return a reader with the same number of bits per value.

Throws:
IOException


Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.