Package org.zkoss.pivot.impl.calc
Class MinMaxContext
- java.lang.Object
-
- org.zkoss.pivot.impl.calc.MinMaxContext
-
- All Implemented Interfaces:
Context<MinMaxContext>
public class MinMaxContext extends Object implements Context<MinMaxContext>
The context that keeps track of the MAX and MIN value of the items.- Author:
- simonpai
-
-
Field Summary
Fields Modifier and Type Field Description protected Numbers.MixedTypedNumber_maxprotected Numbers.MixedTypedNumber_minstatic ContextFactory<MinMaxContext>FACTORY
-
Constructor Summary
Constructors Constructor Description MinMaxContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Object item)Add an item into the aggregation.NumbergetMax()Retrieve MAX.NumbergetMin()Retrieve MIN.voidmerge(MinMaxContext ctx)Merge from another context of the same type.
-
-
-
Field Detail
-
_max
protected Numbers.MixedTypedNumber _max
-
_min
protected Numbers.MixedTypedNumber _min
-
FACTORY
public static final ContextFactory<MinMaxContext> FACTORY
-
-
Method Detail
-
add
public void add(Object item)
Description copied from interface:ContextAdd an item into the aggregation.- Specified by:
addin interfaceContext<MinMaxContext>
-
merge
public void merge(MinMaxContext ctx)
Description copied from interface:ContextMerge from another context of the same type.- Specified by:
mergein interfaceContext<MinMaxContext>
-
getMax
public Number getMax()
Retrieve MAX.
-
getMin
public Number getMin()
Retrieve MIN.
-
-