public class DataUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DAYS_LIMIT_DEFAULT |
Constructor and Description |
---|
DataUtils() |
Modifier and Type | Method and Description |
---|---|
static <T extends Comparable> |
getCategoryDataset(List<Map<T,Number>> dataMaps,
String[] seriesNames) |
static org.jfree.data.time.TimeSeriesCollection |
getTimeSeriesCollection(List<Map<org.jfree.data.time.RegularTimePeriod,Number>> dataMaps,
String[] seriesNames,
Class timePeriodClass) |
static <T,N extends Number> |
getTotalNumber(Map<T,N> data)
Finds the total of a map's values.
|
static <T> void |
makeCumulative(Map<T,Number> dataMap)
Switch a map from being discrete values to being cumulative.
|
static void |
normaliseDateRange(Map<org.jfree.data.time.RegularTimePeriod,List<Long>> dateMap,
int days,
Class period,
TimeZone timeZone) |
static void |
normaliseDateRangeCount(Map<org.jfree.data.time.RegularTimePeriod,Number> dateMap,
int days,
Class period,
TimeZone timeZone) |
static <T> void |
normaliseMapKeys(Map<T,Number> map1,
Map<T,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,
List rowKeysToKeep)
Reduce a given dataset to only contain a specified number of columns
|
public static final int DAYS_LIMIT_DEFAULT
public static <T,N extends Number> Integer getTotalNumber(Map<T,N> data)
data
- The data map to add uppublic static <T> void normaliseMapKeys(Map<T,Number> map1, Map<T,Number> map2)
map1
- The first map to combinemap2
- The second map to combinepublic static <T> void makeCumulative(Map<T,Number> dataMap)
dataMap
- The datamap that will have its values changed to cumulative.public static void normaliseDateRangeCount(Map<org.jfree.data.time.RegularTimePeriod,Number> dateMap, int days, Class period, TimeZone timeZone)
public static void normaliseDateRange(Map<org.jfree.data.time.RegularTimePeriod,List<Long>> dateMap, int days, Class period, TimeZone timeZone)
public static org.jfree.data.time.TimeSeriesCollection reduceDataset(org.jfree.data.time.TimeSeriesCollection dataset, List rowKeysToKeep)
dataset
- The dataset to reducerowKeysToKeep
- The rows to keeppublic static int normalizeDaysValue(int days, ChartFactory.PeriodName period)
days
- The days input by the userperiod
- The period selected by the userpublic static <T extends Comparable> org.jfree.data.category.CategoryDataset getCategoryDataset(List<Map<T,Number>> dataMaps, String[] seriesNames)
Copyright © 2002-2015 Atlassian. All Rights Reserved.