Class CounterUtility


  • public class CounterUtility
    extends java.lang.Object
    Counter utility for getting user input from our pop ups
    • Constructor Summary

      Constructors 
      Constructor Description
      CounterUtility()
      Constructor if developer wants counter with default values
      CounterUtility​(int min, int max, int start, int step)
      Constructor if developer wants counter with custom values
      CounterUtility​(int min, int max, int start, int step, boolean roll)
      Constructor if developer wants rolling counter with custom values
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addToCounter()
      Adds step amount to counter
      void addToCounter​(int i)
      Adds amount of inputted value to counter
      void minusToCounter()
      Removes step amount to counter
      void minusToCounter​(int i)
      Removes amount of inputted value to counter
      void resetCounter()
      Resets counter to defined starting value
      java.lang.String returnCounter()
      Returns counter value in string
      int returnCounterInt()
      Returns counter value in integer
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CounterUtility

        public CounterUtility​(int min,
                              int max,
                              int start,
                              int step,
                              boolean roll)
        Constructor if developer wants rolling counter with custom values
        Parameters:
        min - Minimum value for counter
        max - Maximum value for counter
        start - Value where the counter will start
        step - Value of how big will the default step be
        roll - Boolean to determine if user wants rolling counter
      • CounterUtility

        public CounterUtility​(int min,
                              int max,
                              int start,
                              int step)
        Constructor if developer wants counter with custom values
        Parameters:
        min - Minimum value for counter
        max - Maximum value for counter
        start - Value where the counter will start
        step - Value of how big will the default step be
      • CounterUtility

        public CounterUtility()
        Constructor if developer wants counter with default values
    • Method Detail

      • returnCounter

        public java.lang.String returnCounter()
        Returns counter value in string
        Returns:
        Counter value in string
      • returnCounterInt

        public int returnCounterInt()
        Returns counter value in integer
        Returns:
        Counter value in integer
      • addToCounter

        public void addToCounter()
        Adds step amount to counter
      • addToCounter

        public void addToCounter​(int i)
        Adds amount of inputted value to counter
        Parameters:
        i - Value of how much to add
      • minusToCounter

        public void minusToCounter()
        Removes step amount to counter
      • minusToCounter

        public void minusToCounter​(int i)
        Removes amount of inputted value to counter
        Parameters:
        i - Value of how much to remove
      • resetCounter

        public void resetCounter()
        Resets counter to defined starting value