T
- The type of the accumulated objects@Public public class ListAccumulator<T> extends Object implements Accumulator<T,ArrayList<T>>
Constructor and Description |
---|
ListAccumulator() |
Modifier and Type | Method and Description |
---|---|
void |
add(T value) |
Accumulator<T,ArrayList<T>> |
clone()
Duplicates the accumulator.
|
ArrayList<T> |
getLocalValue() |
void |
merge(Accumulator<T,ArrayList<T>> 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 void add(T value)
add
in interface Accumulator<T,ArrayList<T>>
value
- The value to add to the accumulator objectpublic ArrayList<T> getLocalValue()
getLocalValue
in interface Accumulator<T,ArrayList<T>>
public void resetLocal()
Accumulator
resetLocal
in interface Accumulator<T,ArrayList<T>>
public void merge(Accumulator<T,ArrayList<T>> other)
Accumulator
merge
in interface Accumulator<T,ArrayList<T>>
other
- Reference to accumulator to merge in.public Accumulator<T,ArrayList<T>> clone()
Accumulator
CloneNotSupportedException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.