Class TwoDimensionalStatistics

java.lang.Object
com.atlassian.jira.search.aggregation.twodimensional.TwoDimensionalStatistics

@Internal public class TwoDimensionalStatistics extends Object
Holder for the statistics of a two dimensional aggregation, containing the total hit count, X and Y totals, irrelevant counts and the mapping of a row to its column values (cells).
Since:
10.7
  • Constructor Details

  • Method Details

    • getRowToColumnValuesMap

      public Map<Statistic,Map<Object,Statistic>> getRowToColumnValuesMap()
      Retrieve the mapping of a row (Y axis) to its column values (X axis) values.

      • The map is structured as follows:
        • the key is a Statistic representing the row (Y axis) value/label
        • the value is a map where:
          • the key is the column (X axis) value/label
          • the value is a Statistic representing the count for that cell

      Returns:
      a map of row to column values
    • getXValueTotals

      public List<Statistic> getXValueTotals(Comparator<Statistic> comparator)
      Retrieve a sorted list using the provided Comparator of all the X axis values with their total counts.
      Parameters:
      comparator - to sort the list
      Returns:
      the sorted list of X axis values with their total counts
    • getXValueTotals

      public List<Statistic> getXValueTotals()
      Retrieves the list of X value totals
      Returns:
      the X Axis totals
    • getYValueTotals

      public List<Statistic> getYValueTotals(Comparator<Statistic> comparator)
      Retrieve a sorted list using the provided Comparator of all the Y axis values with their total counts.
      Parameters:
      comparator - to sort the list
      Returns:
      the sorted list of Y axis values with their total counts
    • getYValueTotals

      public List<Statistic> getYValueTotals()
      Retrieves the list of Y value totals
      Returns:
      the Y Axis totals
    • getHitCount

      public long getHitCount()
      The total number of hits (documents) that matched the search request.
      Returns:
      the total number of hits
    • getBothIrrelevant

      public long getBothIrrelevant()
      The number of hits (documents) where both x and y were irrelevant for the document (not visible).
      Returns:
      the number of hits where both x and y were irrelevant
    • hasIrrelevantXData

      public boolean hasIrrelevantXData()
      Test if there are any irrelevant data for the x-axis.
      Returns:
      true if there are irrelevant data for the x-axis
    • hasIrrelevantYData

      public boolean hasIrrelevantYData()
      Test if there are any irrelevant data for the y axis.
      Returns:
      true if there are irrelevant data for the y axis
    • hasBothIrrelevantData

      public boolean hasBothIrrelevantData()
      Test if there are any irrelevant data for both x and y axis.
      Returns:
      true if there are irrelevant data for both x and y axis
    • getxIrrelevant

      public long getxIrrelevant()
      The number of hits (documents) where the x axis was irrelevant for the document (not visible).
      Returns:
      the number of hits where the x axis was irrelevant
    • getYIrrelevant

      public long getYIrrelevant()
      The number of hits (documents) where the y axis was irrelevant for the document (not visible).
      Returns:
      the number of hits where the y axis was irrelevant