Module hw06

Interface IAccumulator

All Known Implementing Classes:
AAccumulator, CopyAcc, LastNegAcc, ProdAcc, SumAcc

public interface IAccumulator
An accumulator for use in FoldR and FoldL. The toString() methods of any concrete implementation should be overridden to return a String representation of the current accumulated value.
Author:
swong
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Accumulates the given value into the internally stored total
  • Method Details

    • accumulate

      void accumulate(Object x)
      Accumulates the given value into the internally stored total
      Parameters:
      x - The value to process for accumulation