Class Reducer.Count

  • All Implemented Interfaces:
    Reducer
    Enclosing interface:
    Reducer

    public static class Reducer.Count
    extends java.lang.Object
    implements Reducer
    • Constructor Summary

      Constructors 
      Constructor Description
      Count()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double identity()
      The identity element is used as the initial value.
      double reduce​(double current, double message)
      Computes a new value based on the current value and the message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Count

        public Count()
    • Method Detail

      • identity

        public double identity()
        Description copied from interface: Reducer
        The identity element is used as the initial value.
        Specified by:
        identity in interface Reducer
      • reduce

        public double reduce​(double current,
                             double message)
        Description copied from interface: Reducer
        Computes a new value based on the current value and the message.
        Specified by:
        reduce in interface Reducer