public abstract class AbstractPagedMutable<T extends AbstractPagedMutable<T>> extends LongValues implements Accountable
PagedMutable
and PagedGrowableWriter
.IDENTITY, ZEROES
Modifier and Type | Method and Description |
---|---|
protected long |
baseRamBytesUsed() |
protected void |
fillPages() |
long |
get(long index)
Get value at
index . |
T |
grow()
Similar to
ArrayUtil.grow(long[]) . |
T |
grow(long minSize)
Similar to
ArrayUtil.grow(long[], int) . |
protected abstract PackedInts.Mutable |
newMutable(int valueCount,
int bitsPerValue) |
protected abstract T |
newUnfilledCopy(long newSize) |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
T |
resize(long newSize)
Create a new copy of size
newSize based on the content of
this buffer. |
void |
set(long index,
long value)
Set value at
index . |
long |
size()
The number of values.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChildResources
protected final void fillPages()
protected abstract PackedInts.Mutable newMutable(int valueCount, int bitsPerValue)
public final long size()
public final long get(long index)
LongValues
index
.get
in class LongValues
public final void set(long index, long value)
index
.protected long baseRamBytesUsed()
public long ramBytesUsed()
Accountable
ramBytesUsed
in interface Accountable
protected abstract T newUnfilledCopy(long newSize)
public final T resize(long newSize)
newSize
based on the content of
this buffer. This method is much more efficient than creating a new
instance and copying values one by one.public final T grow(long minSize)
ArrayUtil.grow(long[], int)
.public final T grow()
ArrayUtil.grow(long[])
.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.