|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.charts.util.DataUtils
public class DataUtils
Utility methods for manipulating data
Field Summary | |
---|---|
static int |
DAYS_LIMIT_DEFAULT
|
Constructor Summary | |
---|---|
DataUtils()
|
Method Summary | ||
---|---|---|
static org.jfree.data.category.CategoryDataset |
getCategoryDataset(java.util.List<java.util.Map<org.jfree.data.time.RegularTimePeriod,java.lang.Number>> dataMaps,
java.lang.String[] seriesNames)
|
|
static org.jfree.data.time.TimeSeriesCollection |
getTimeSeriesCollection(java.util.List<java.util.Map<org.jfree.data.time.RegularTimePeriod,java.lang.Number>> dataMaps,
java.lang.String[] seriesNames,
java.lang.Class timePeriodClass)
|
|
static
|
getTotalNumber(java.util.Map<T,N> data)
Finds the total of a map's values. |
|
static
|
makeCumulative(java.util.Map<T,java.lang.Number> dataMap)
Switch a map from being discrete values to being cumulative. |
|
static void |
normaliseDateRange(java.util.Map<org.jfree.data.time.RegularTimePeriod,java.util.List<java.lang.Long>> dateMap,
int days,
java.lang.Class period)
|
|
static void |
normaliseDateRangeCount(java.util.Map<org.jfree.data.time.RegularTimePeriod,java.lang.Number> dateMap,
int days,
java.lang.Class period)
|
|
static
|
normaliseMapKeys(java.util.Map<T,java.lang.Number> map1,
java.util.Map<T,java.lang.Number> map2)
This method takes two maps, and ensures that all the keys in one map are in the other map, and vice versa. |
|
static int |
normalizeDaysValue(int days,
ChartFactory.PeriodName period)
Trims days to a range of [1...MAX_FOR_PERIOD] where the max is defined in jira-application.properties for each period. |
|
static org.jfree.data.time.TimeSeriesCollection |
reduceDataset(org.jfree.data.time.TimeSeriesCollection dataset,
java.util.List rowKeysToKeep)
Reduce a given dataset to only contain a specified number of columns |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DAYS_LIMIT_DEFAULT
Constructor Detail |
---|
public DataUtils()
Method Detail |
---|
public static <T,N extends java.lang.Number> java.lang.Integer getTotalNumber(java.util.Map<T,N> data)
data
- The data map to add up
public static <T> void normaliseMapKeys(java.util.Map<T,java.lang.Number> map1, java.util.Map<T,java.lang.Number> map2)
map1
- The first map to combinemap2
- The second map to combinepublic static <T> void makeCumulative(java.util.Map<T,java.lang.Number> dataMap)
dataMap
- The datamap that will have its values changed to cumulative.public static void normaliseDateRangeCount(java.util.Map<org.jfree.data.time.RegularTimePeriod,java.lang.Number> dateMap, int days, java.lang.Class period)
public static void normaliseDateRange(java.util.Map<org.jfree.data.time.RegularTimePeriod,java.util.List<java.lang.Long>> dateMap, int days, java.lang.Class period)
public static org.jfree.data.time.TimeSeriesCollection reduceDataset(org.jfree.data.time.TimeSeriesCollection dataset, java.util.List rowKeysToKeep)
dataset
- The dataset to reducerowKeysToKeep
- The rows to keep
public static int normalizeDaysValue(int days, ChartFactory.PeriodName period)
days
- The days input by the userperiod
- The period selected by the user
public static org.jfree.data.category.CategoryDataset getCategoryDataset(java.util.List<java.util.Map<org.jfree.data.time.RegularTimePeriod,java.lang.Number>> dataMaps, java.lang.String[] seriesNames)
public static org.jfree.data.time.TimeSeriesCollection getTimeSeriesCollection(java.util.List<java.util.Map<org.jfree.data.time.RegularTimePeriod,java.lang.Number>> dataMaps, java.lang.String[] seriesNames, java.lang.Class timePeriodClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |