Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.util.packed
Class MonotonicAppendingLongBuffer

    java.lang.Object
      org.apache.lucene.util.packed.MonotonicAppendingLongBuffer

    public final class MonotonicAppendingLongBuffer

extends Object

Utility class to buffer signed longs in memory, which is optimized for the case where the sequence is monotonic, although it can encode any sequence of arbitrary longs. It only supports appending.

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

Nested Class Summary
`class` | `MonotonicAppendingLongBuffer.Iterator` A long iterator.

Constructor Summary
`MonotonicAppendingLongBuffer()` Sole constructor.

Method Summary
`void` | `add(long l)` Append a value to this buffer.
`long` | `get(long index)` Get a value from this buffer.
`MonotonicAppendingLongBuffer.Iterator` | `iterator()` Return an iterator over the values of this buffer.
`long` | `ramBytesUsed()` Return the number of bytes used by this instance.
`long` | `size()` Get the number of values that have been added to the buffer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MonotonicAppendingLongBuffer

    public MonotonicAppendingLongBuffer()

  Sole constructor.

Method Detail

### iterator

    public MonotonicAppendingLongBuffer.Iterator iterator()

  Return an iterator over the values of this buffer.

### ramBytesUsed

    public long ramBytesUsed()

  Return the number of bytes used by this instance.

### size

    public final long size()

  Get the number of values that have been added to the buffer.

### add

    public final void add(long l)

  Append a value to this buffer.

### get

    public final long get(long index)

  Get a value from this buffer.

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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