org.zkoss.pivot.impl.calc
Class MinMaxContext

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

public class MinMaxContext
extends java.lang.Object
implements Context<MinMaxContext>

The context that keeps track of the MAX and MIN value of the items.

Author:
simonpai

Field Summary
protected  Numbers.MixedTypedNumber _max
           
protected  Numbers.MixedTypedNumber _min
           
static ContextFactory<MinMaxContext> FACTORY
           
 
Constructor Summary
MinMaxContext()
           
 
Method Summary
 void add(java.lang.Object item)
          Add an item into the aggregation.
 java.lang.Number getMax()
          Retrieve MAX.
 java.lang.Number getMin()
          Retrieve MIN.
 void merge(MinMaxContext ctx)
          Merge from another context of the same type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_max

protected Numbers.MixedTypedNumber _max

_min

protected Numbers.MixedTypedNumber _min

FACTORY

public static final ContextFactory<MinMaxContext> FACTORY
Constructor Detail

MinMaxContext

public MinMaxContext()
Method Detail

add

public void add(java.lang.Object item)
Description copied from interface: Context
Add an item into the aggregation.

Specified by:
add in interface Context<MinMaxContext>

merge

public void merge(MinMaxContext ctx)
Description copied from interface: Context
Merge from another context of the same type.

Specified by:
merge in interface Context<MinMaxContext>

getMax

public java.lang.Number getMax()
Retrieve MAX.


getMin

public java.lang.Number getMin()
Retrieve MIN.



Copyright © 2012. All Rights Reserved.