public static class EmptyFieldsCountAccumulator.VectorAccumulator extends Object implements Accumulator<Integer,ArrayList<Integer>>
add(Integer)
increments the
n-th vector component. The size of the vector is automatically managed.Constructor and Description |
---|
VectorAccumulator() |
VectorAccumulator(ArrayList<Integer> resultVector) |
Modifier and Type | Method and Description |
---|---|
void |
add(Integer position)
Increases the result vector component at the specified position by 1.
|
Accumulator<Integer,ArrayList<Integer>> |
clone()
Duplicates the accumulator.
|
ArrayList<Integer> |
getLocalValue() |
void |
merge(Accumulator<Integer,ArrayList<Integer>> 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(Integer position)
add
in interface Accumulator<Integer,ArrayList<Integer>>
position
- The value to add to the accumulator objectpublic ArrayList<Integer> getLocalValue()
getLocalValue
in interface Accumulator<Integer,ArrayList<Integer>>
public void resetLocal()
Accumulator
resetLocal
in interface Accumulator<Integer,ArrayList<Integer>>
public void merge(Accumulator<Integer,ArrayList<Integer>> other)
Accumulator
merge
in interface Accumulator<Integer,ArrayList<Integer>>
other
- Reference to accumulator to merge in.public Accumulator<Integer,ArrayList<Integer>> clone()
Accumulator
CloneNotSupportedException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.