R
- the return type of the statistic valuepublic abstract class StatisticValue<R> extends Object implements Mergeable
Modifier and Type | Field and Description |
---|---|
protected ByteArray |
bin |
static ByteArray |
NO_BIN |
protected Statistic<?> |
statistic |
Constructor and Description |
---|
StatisticValue(Statistic<?> statistic)
Construct a new value with the given parent statistic.
|
Modifier and Type | Method and Description |
---|---|
ByteArray |
getBin()
Gets the bin for this value.
|
Statistic<?> |
getStatistic()
Get the parent statistic.
|
abstract R |
getValue()
Get the raw value of the statistic value.
|
static byte[] |
getValueId(StatisticId<?> statisticId,
byte[] bin)
Get a unique identifier for a value given a statistic id and bin.
|
static byte[] |
getValueId(StatisticId<?> statisticId,
ByteArray bin)
Get a unique identifier for a value given a statistic id and bin.
|
abstract void |
merge(Mergeable merge)
Merge another statistic value into this one.
|
void |
setBin(ByteArray bin)
Sets the bin for this value.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fromBinary, toBinary
public static final ByteArray NO_BIN
protected final Statistic<?> statistic
protected ByteArray bin
public StatisticValue(Statistic<?> statistic)
statistic
- the parent statisticpublic Statistic<?> getStatistic()
public void setBin(ByteArray bin)
bin
- the bin for this valuepublic ByteArray getBin()
public abstract void merge(Mergeable merge)
public abstract R getValue()
public static byte[] getValueId(StatisticId<?> statisticId, ByteArray bin)
statisticId
- the statistic idbin
- the binpublic static byte[] getValueId(StatisticId<?> statisticId, byte[] bin)
statisticId
- the statistic idbin
- the binCopyright © 2013–2022. All rights reserved.