|
||||||||||
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
|
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
|
getTotalNumber(Map<T,N> data)
Finds the total of a map's values. |
|
static
|
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
|
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 |
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 Number> Integer getTotalNumber(Map<T,N> data)
data
- The data map to add up
public 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 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 <T extends Comparable> org.jfree.data.category.CategoryDataset getCategoryDataset(List<Map<T,Number>> dataMaps, String[] seriesNames)
public static org.jfree.data.time.TimeSeriesCollection getTimeSeriesCollection(List<Map<org.jfree.data.time.RegularTimePeriod,Number>> dataMaps, String[] seriesNames, Class timePeriodClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |