Package org.zkoss.pivot.impl.util
Class Calculations
java.lang.Object
org.zkoss.pivot.impl.util.Calculations
A utility class for the pivot package.
- Author:
- jumperchen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intA common compareTo method forString,Date,Float,Double,Integer,Long,Short,Byte,Calendar, andBoolean.static Collection<Object>getNonNullValues(Collection<Object> data) Filter the array to return an array containing only non null valuesgetNumericValues(Collection<Object> data, boolean strict) Filter the array to return an array containing only numeric valuesstatic Numbersum(Collection<Object> data) A common sum method forDouble,Float,Integer,Long,Short, andByte.
-
Constructor Details
-
Calculations
public Calculations()
-
-
Method Details
-
compare
A common compareTo method forString,Date,Float,Double,Integer,Long,Short,Byte,Calendar, andBoolean. Otherwise Object.toString() will be assumed. -
sum
A common sum method forDouble,Float,Integer,Long,Short, andByte. Otherwise, it will count the data length. -
getNonNullValues
Filter the array to return an array containing only non null values -
getNumericValues
Filter the array to return an array containing only numeric values
-