Class IncrementCounterMap

java.lang.Object
javatapas.util.IncrementCounterMap

public class IncrementCounterMap
extends Object
Version:
2021-05-18
Author:
Kodiak Brown
  • Constructor Details

    • IncrementCounterMap

      public IncrementCounterMap()
  • Method Details

    • incrementCounterMap

      public static void incrementCounterMap​(Map<String,​Integer> counterMap, String key)
      This will default to start value of 0 and an increment value of 1.
      Parameters:
      counterMap - The Map mapping String keys to integer values identifying the number of times the key has been called.
      key - The String key that is being incremented.
    • incrementCounterMap

      public static void incrementCounterMap​(Map<String,​Integer> counterMap, String key, int incValue)
      This will default to start value of 0.
      Parameters:
      counterMap - The Map mapping String keys to integer values identifying the number of times the key has been called.
      key - The String key that is being incremented.
      incValue - The amount to increment the counter by.
    • incrementCounterMap

      public static void incrementCounterMap​(Map<String,​Integer> counterMap, String key, int startValue, int incValue)
      Parameters:
      counterMap - The Map mapping String keys to integer values identifying the number of times the key has been called.
      key - The String key that is being incremented.
      startValue - The value to start the counter with.
      incValue - The amount to increment the counter by.