Skip to content
Snippets Groups Projects
Commit f1face1e authored by Imran Rashid's avatar Imran Rashid Committed by Matei Zaharia
Browse files

rename addToAccum to addAccumulator

parent 2d666b9d
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ class Accumulable[T,R] (
* add more data to this accumulator / accumulable
* @param term
*/
def += (term: R) { value_ = param.addToAccum(value_, term) }
def += (term: R) { value_ = param.addAccumulator(value_, term) }
/**
* merge two accumulable objects together
......@@ -57,7 +57,7 @@ class Accumulator[T](
* @tparam T
*/
trait AccumulatorParam[T] extends AccumulableParam[T,T] {
def addToAccum(t1: T, t2: T) : T = {
def addAccumulator(t1: T, t2: T) : T = {
addInPlace(t1, t2)
}
}
......@@ -80,7 +80,7 @@ trait AccumulableParam[T,R] extends Serializable {
* @param t2 the data to be added to the accumulator
* @return the new value of the accumulator
*/
def addToAccum(t1: T, t2: R) : T
def addAccumulator(t1: T, t2: R) : T
/**
* merge two accumulated values together
......
......@@ -53,7 +53,7 @@ class AccumulatorSuite extends FunSuite with ShouldMatchers {
t1 ++= t2
t1
}
def addToAccum(t1: mutable.Set[Any], t2: Any) : mutable.Set[Any] = {
def addAccumulator(t1: mutable.Set[Any], t2: Any) : mutable.Set[Any] = {
t1 += t2
t1
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment