// As this is used for testing - it is package private void addValue(Object xValue, Object yValue, int i) { Map yValues = (Map) xAxis.get(xValue); if (yValues == null) { yValues = new TreeMap(ComparatorSelector.getComparator(yAxisMapper)); xAxis.put(xValue, yValues); } Number existingValue = (Number) yValues.get(yValue); yValues.put(yValue, statisticGatherer.getValue(existingValue, i)); }
/** * This method will increment the unique totals count for the y row identified by yKey. * * @param yValue identifies the yValue we are keying on, null is valid. * @param i the amount to increment the total by, usually 1. */ private void addToYTotal(Object yValue, int i) { Number total = (Number) yAxisTotals.get(yValue); yAxisTotals.put(yValue, statisticGatherer.getValue(total, i)); }
/** * This method will increment the unique totals count for the provided xKey. * * @param xValue identifies the xValue we are keying on, null is valid. * @param i the amount to increment the total by, usually 1. */ private void addToXTotal(Object xValue, int i) { Number total = (Number) xAxisTotals.get(xValue); xAxisTotals.put(xValue, statisticGatherer.getValue(total, i)); }
// Adds to irrelevant totals of X for all the passed in Y keys void addToXIrrelevantTotals(final Collection yValues, final int incrementValue) { for (Object yValue : yValues) { Number existingValue = xAxisIrrelevantTotals.get(yValue); xAxisIrrelevantTotals.put(yValue, statisticGatherer.getValue(existingValue, incrementValue)); } }
// Adds to irrelevant totals of Y for all the passed in X keys void addToYIrrelevantTotals(final Collection xValues, final int incrementValue) { for (Object xValue : xValues) { Number existingValue = yAxisIrrelevantTotals.get(xValue); yAxisIrrelevantTotals.put(xValue, statisticGatherer.getValue(existingValue, incrementValue)); } }
/** * Increments the total count of unique issues added to this StatsMap. * * @param i the amount to increment the total by, usually 1. */ private void addToEntireTotal(int i) { entireTotal = statisticGatherer.getValue(entireTotal, i); }