com.atlassian.jira.issue.statistics
Class TwoDimensionalStatsMap

java.lang.Object
  extended by com.atlassian.jira.issue.statistics.TwoDimensionalStatsMap

public class TwoDimensionalStatsMap
extends Object


Field Summary
static String ASC
           
static String DESC
           
static String NATURAL_ORDER
           
static String TOTAL_ORDER
           
 
Constructor Summary
TwoDimensionalStatsMap(StatisticsMapper xAxisMapper, StatisticsMapper yAxisMapper)
           
TwoDimensionalStatsMap(StatisticsMapper xAxisMapper, StatisticsMapper yAxisMapper, StatisticGatherer statisticGatherer)
           
 
Method Summary
 void adjustMapForIrrelevantValues(Collection xAxisValues, boolean xIrrelevant, Collection yAxisValues, boolean yIrrelevant, int incrementValue)
          Used to keep track of the irrelevant counts for the issues returned for this 2D stats map.
 void adjustMapForValues(Collection xAxisValues, Collection yAxisValues, int value)
           
 int getBothIrrelevant()
          If hasIrrelevantXData() is true and hasIrrelevantYData() is true then we need to know the total where both axis are irrelevant.
 int getCoordinate(Object xAxis, Object yAxis)
           
 long getUniqueTotal()
          Returns the value of all unique issues identified within this StatsMap.
 Collection getXAxis()
           
 int getXAxisIrrelevantTotal(Object yAxis)
          Returns the number of irrelevant issues for the X axis contained in the column identified by yAxis.
 StatisticsMapper getxAxisMapper()
           
 int getXAxisUniqueTotal(Object xAxis)
          Returns the value of unique issues contained in the column identified by xAxis.
 Collection getYAxis()
           
 Collection getYAxis(Comparator comp)
           
 Collection getYAxis(String orderBy, String direction)
           
 int getYAxisIrrelevantTotal(Object xAxis)
          Returns the number of irrelevant issues for the Y axis contained in the column identified by xAxis.
 StatisticsMapper getyAxisMapper()
           
 int getYAxisUniqueTotal(Object yAxis)
          Returns the value of unique issues contained in the column identified by xAxis.
 boolean hasIrrelevantXData()
           
 boolean hasIrrelevantYData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOTAL_ORDER

public static final String TOTAL_ORDER
See Also:
Constant Field Values

NATURAL_ORDER

public static final String NATURAL_ORDER
See Also:
Constant Field Values

DESC

public static final String DESC
See Also:
Constant Field Values

ASC

public static final String ASC
See Also:
Constant Field Values
Constructor Detail

TwoDimensionalStatsMap

public TwoDimensionalStatsMap(StatisticsMapper xAxisMapper,
                              StatisticsMapper yAxisMapper,
                              StatisticGatherer statisticGatherer)

TwoDimensionalStatsMap

public TwoDimensionalStatsMap(StatisticsMapper xAxisMapper,
                              StatisticsMapper yAxisMapper)
Method Detail

getXAxis

public Collection getXAxis()

getYAxis

public Collection getYAxis()

getYAxis

public Collection getYAxis(String orderBy,
                           String direction)

getYAxis

public Collection getYAxis(Comparator comp)

getCoordinate

public int getCoordinate(Object xAxis,
                         Object yAxis)

getyAxisMapper

public StatisticsMapper getyAxisMapper()

getxAxisMapper

public StatisticsMapper getxAxisMapper()

getXAxisUniqueTotal

public int getXAxisUniqueTotal(Object xAxis)
Returns the value of unique issues contained in the column identified by xAxis.

Parameters:
xAxis - identifies the column who's total is requested, null is valid.
Returns:
number of unique issues for the identified column.

getYAxisUniqueTotal

public int getYAxisUniqueTotal(Object yAxis)
Returns the value of unique issues contained in the column identified by xAxis.

Parameters:
yAxis - identifies the row who's total is requested, null is valid.
Returns:
number of unique issues for the identified row.

getXAxisIrrelevantTotal

public int getXAxisIrrelevantTotal(Object yAxis)
Returns the number of irrelevant issues for the X axis contained in the column identified by yAxis. The X axis values is implied by the method, it is the Irrelevant ones, the Y axis identifies which irrelevant X count we are after.

Parameters:
yAxis - identifies the column who's total is requested, null is valid.
Returns:
number of number of irrelevant issues for the identified column/row.

getYAxisIrrelevantTotal

public int getYAxisIrrelevantTotal(Object xAxis)
Returns the number of irrelevant issues for the Y axis contained in the column identified by xAxis. The Y axis values is implied by the method, it is the Irrelevant ones, the X axis identifies which irrelevant Y count we are after.

Parameters:
xAxis - identifies the column who's total is requested, null is valid.
Returns:
number of number of irrelevant issues for the identified column/row.

getBothIrrelevant

public int getBothIrrelevant()
If hasIrrelevantXData() is true and hasIrrelevantYData() is true then we need to know the total where both axis are irrelevant. This method will return that count.

Returns:
the number of issues that have both X and Y irrelevant data.

hasIrrelevantXData

public boolean hasIrrelevantXData()
Returns:
true if the results contain irrelevant data for the X axis stat type.

hasIrrelevantYData

public boolean hasIrrelevantYData()
Returns:
true if the results contain irrelevant data for the Y axis stat type.

getUniqueTotal

public long getUniqueTotal()
Returns the value of all unique issues identified within this StatsMap.

Returns:
number of unique issues identified within this StatsMap.

adjustMapForIrrelevantValues

public void adjustMapForIrrelevantValues(Collection xAxisValues,
                                         boolean xIrrelevant,
                                         Collection yAxisValues,
                                         boolean yIrrelevant,
                                         int incrementValue)
Used to keep track of the irrelevant counts for the issues returned for this 2D stats map.

Parameters:
xAxisValues - null or the relevant X values for an issue
xIrrelevant - true if the X field is not visible for the issue we are recording stats for, false otherwise
yAxisValues - null or the relevant Y values for an issue
yIrrelevant - true if the Y field is not visible for the issue we are recording stats for, false otherwise
incrementValue - the value to increment the counts by, seems to always be 1, perhaps someone once thought we would do otherwise.

adjustMapForValues

public void adjustMapForValues(Collection xAxisValues,
                               Collection yAxisValues,
                               int value)


Copyright © 2002-2014 Atlassian. All Rights Reserved.