public class IntegerSummary extends Object implements UpdatableSummary<Integer>
| Modifier and Type | Class and Description |
|---|---|
static class |
IntegerSummary.Mode
The aggregation modes for this Summary
|
| Constructor and Description |
|---|
IntegerSummary(IntegerSummary.Mode mode)
Creates an instance of IntegerSummary with a given mode.
|
| Modifier and Type | Method and Description |
|---|---|
IntegerSummary |
copy()
Deep copy.
|
static DeserializeResult<IntegerSummary> |
fromMemory(org.apache.datasketches.memory.Memory mem)
Creates an instance of the IntegerSummary given a serialized representation
|
int |
getValue() |
byte[] |
toByteArray()
This is to serialize a Summary instance to a byte array.
|
IntegerSummary |
update(Integer value)
This is to provide a method of updating summaries.
|
public IntegerSummary(IntegerSummary.Mode mode)
mode - update mode. This should not be called by a user.public IntegerSummary update(Integer value)
UpdatableSummaryupdate in interface UpdatableSummary<Integer>value - update valuepublic IntegerSummary copy()
SummaryCaution: This must implement a deep copy.
public int getValue()
public byte[] toByteArray()
SummaryThe user should encode in the byte array its total size, which is used during deserialization, especially if the Summary has variable sized elements.
toByteArray in interface Summarypublic static DeserializeResult<IntegerSummary> fromMemory(org.apache.datasketches.memory.Memory mem)
mem - Memory object with serialized IntegerSummaryCopyright © 2015–2024 The Apache Software Foundation. All rights reserved.