public class PackedLongArray extends Object
get()
, set()
,
add()
and increment()
operations on the logical contents of the array.Constructor and Description |
---|
PackedLongArray(int virtualLength) |
PackedLongArray(int virtualLength,
int initialPhysicalLength) |
Modifier and Type | Method and Description |
---|---|
void |
add(org.HdrHistogram.packedarray.AbstractPackedLongArray other)
Add the contents of the other array to this one
|
void |
add(int index,
long value)
Add to a value at a virtual index in the array
|
void |
clear()
Clear the array contents
|
PackedLongArray |
copy()
Create a copy of this array, complete with data and everything.
|
boolean |
equals(Object other)
Determine if this array is equivalent to another.
|
long |
get(int index)
Get value at virtual index in the array
|
long |
getEndTimeStamp()
get the end time stamp [optionally] stored with this array
|
int |
getPhysicalLength()
Get the current physical length (in longs) of the array's backing storage
|
long |
getStartTimeStamp()
get the start time stamp [optionally] stored with this array
|
int |
hashCode() |
void |
increment(int index)
Increment value at a virrual index in the array
|
Iterator<Long> |
iterator()
An Iterator over all values in the array
|
int |
length()
Get the (virtual) length of the array
|
Iterable<IterationValue> |
nonZeroValues()
An Iterator over all non-Zero values in the array
|
void |
set(int index,
long value)
Set the value at a virtual index in the array
|
void |
setEndTimeStamp(long timeStampMsec)
Set the end time stamp value associated with this array to a given value.
|
void |
setStartTimeStamp(long timeStampMsec)
Set the start time stamp value associated with this array to a given value.
|
void |
setVirtualLength(int newVirtualArrayLength)
Set a new virtual length for the array.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public PackedLongArray(int virtualLength)
public PackedLongArray(int virtualLength, int initialPhysicalLength)
public void setVirtualLength(int newVirtualArrayLength)
newVirtualArrayLength
- thepublic PackedLongArray copy()
public long getStartTimeStamp()
public void setStartTimeStamp(long timeStampMsec)
timeStampMsec
- the value to set the time stamp to, [by convention] in msec since the epoch.public long getEndTimeStamp()
public void setEndTimeStamp(long timeStampMsec)
timeStampMsec
- the value to set the time stamp to, [by convention] in msec since the epoch.public long get(int index)
index
- the virtual array indexpublic void increment(int index)
index
- virtual index of value to incrementpublic void add(int index, long value)
index
- the virtual index of the value to be added tovalue
- the value to addpublic void set(int index, long value)
index
- the virtual index of the value to setvalue
- the value to setpublic void add(org.HdrHistogram.packedarray.AbstractPackedLongArray other)
other
- The to add to this arraypublic void clear()
public int getPhysicalLength()
public int length()
public Iterable<IterationValue> nonZeroValues()
public boolean equals(Object other)
Copyright © 2019. All rights reserved.