Class CalculateLongSum


  • public class CalculateLongSum
    extends java.lang.Object
    Helper class to sum up Long-Channels.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValue​(Channel<java.lang.Long> channel)
      Adds a Channel-Value.
      java.lang.Long calculate()
      Calculates the sum.
      • Methods inherited from class java.lang.Object

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

      • CalculateLongSum

        public CalculateLongSum()
    • Method Detail

      • addValue

        public void addValue​(Channel<java.lang.Long> channel)
        Adds a Channel-Value.
        Parameters:
        channel - the Channel
      • calculate

        public java.lang.Long calculate()
                                 throws java.util.NoSuchElementException
        Calculates the sum.
        Returns:
        the sum or null
        Throws:
        java.util.NoSuchElementException - on error