Class SumCountContext

java.lang.Object
org.zkoss.pivot.impl.calc.SumCountContext
All Implemented Interfaces:
Context<SumCountContext>

public class SumCountContext extends Object implements Context<SumCountContext>
The most commonly used context including SUM, COUNT and COUNT_NUMBER aggregation.
Author:
simonpai
  • Field Details

  • Constructor Details

    • SumCountContext

      public SumCountContext()
  • Method Details

    • add

      public void add(Object item)
      Description copied from interface: Context
      Add an item into the aggregation.
      Specified by:
      add in interface Context<SumCountContext>
    • merge

      public void merge(SumCountContext ctx)
      Description copied from interface: Context
      Merge from another context of the same type.
      Specified by:
      merge in interface Context<SumCountContext>
    • getCount

      public int getCount()
      Retrieve COUNT, which includes the count of non-number objects.
    • getNumberCount

      public int getNumberCount()
      Retrieve NUMBER COUNT, which excludes the count of non-number objects.
    • getSum

      public Number getSum()
      Retrieve SUM.