public static class ChecksumHashCode.Checksum extends Object implements SimpleAccumulator<ChecksumHashCode.Checksum>
Constructor and Description |
---|
Checksum(long count,
long checksum)
Instantiate an immutable result.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ChecksumHashCode.Checksum value) |
Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum> |
clone()
Duplicates the accumulator.
|
boolean |
equals(Object obj) |
long |
getChecksum()
Get the checksum over the hash() of elements.
|
long |
getCount()
Get the number of elements.
|
ChecksumHashCode.Checksum |
getLocalValue() |
int |
hashCode() |
void |
merge(Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum> other)
Used by system internally to merge the collected parts of an accumulator at the end of the
job.
|
void |
resetLocal()
Reset the local value.
|
String |
toString() |
public Checksum(long count, long checksum)
count
- countchecksum
- checksumpublic long getCount()
public long getChecksum()
public void add(ChecksumHashCode.Checksum value)
add
in interface Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum>
value
- The value to add to the accumulator objectpublic ChecksumHashCode.Checksum getLocalValue()
getLocalValue
in interface Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum>
public void resetLocal()
Accumulator
resetLocal
in interface Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum>
public void merge(Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum> other)
Accumulator
merge
in interface Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum>
other
- Reference to accumulator to merge in.public Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum> clone()
Accumulator
CloneNotSupportedException
clone
in interface Accumulator<ChecksumHashCode.Checksum,ChecksumHashCode.Checksum>
clone
in class Object
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.