Class Statistics


  • public class Statistics
    extends Object
    This class provides a wrapper for a related set of statistics. It contains headers for the Stat key and value pairs for the convenience of displaying them to users as, for example, HTML table headers. It also holds the list of statistics, and can have them added to itself individually or in arrays
    Author:
    Richard Jones
    • Method Detail

      • add

        public void add​(Stat stat)
        add an individual statistic to this object
        Parameters:
        stat - a statistic for this object
      • setStatName

        public void setStatName​(String name)
        set the name of the statistic column
        Parameters:
        name - the name of the statistic column
      • setResultName

        public void setResultName​(String name)
        set the name of the results column
        Parameters:
        name - the name of the results column
      • setExplanation

        public void setExplanation​(String explanation)
        set the explanatory or clarification information for this block of stats
        Parameters:
        explanation - the explanation for this stat block
      • getExplanation

        public String getExplanation()
        get the explanation or clarification information for this block of stats
        Returns:
        the explanation for this stat block
      • setFloor

        public void setFloor​(int floor)
        set the floor value used in this stat block
        Parameters:
        floor - the floor value for this stat block
      • getFloor

        public int getFloor()
        get the floor value used in this stat block
        Returns:
        the floor value for this stat block
      • setSectionHeader

        public void setSectionHeader​(String header)
        set the header for this particular stats block
        Parameters:
        header - for this stats block
      • getSectionHeader

        public String getSectionHeader()
        get the header for this particular stats block
        Returns:
        the header for this stats block
      • add

        public void add​(Stat[] stats)
        add an array of statistics to this object
        Parameters:
        stats - an array of statistics
      • getStats

        public Stat[] getStats()
        get an array of statistics back from this object
        Returns:
        the statistics array
      • getStatName

        public String getStatName()
        get the name of the statistic
        Returns:
        the name of the statistic
      • getResultName

        public String getResultName()
        get the name of the result set
        Returns:
        the name of the result set