Class StrategyUtils


  • public final class StrategyUtils
    extends Object
    • Constructor Detail

      • StrategyUtils

        public StrategyUtils()
    • Method Detail

      • isNotEmpty

        public static boolean isNotEmpty​(CharSequence cs)
      • isNumeric

        public static boolean isNumeric​(CharSequence cs)
      • getNormalizedNumber

        public static int getNormalizedNumber​(String identifier,
                                              String groupId)
        Takes to string inputs concat them, produce a hash and return a normalized value between 0 and 100;
        Parameters:
        identifier -
        groupId -
        Returns:
      • getNormalizedNumber

        public static int getNormalizedNumber​(String identifier,
                                              String groupId,
                                              int normalizer)
      • getPercentage

        public static int getPercentage​(String percentage)
        Takes a numeric string value and converts it to a integer between 0 and 100.

        returns 0 if the string is not numeric.

        Parameters:
        percentage - - A numeric string value
        Returns:
        a integer between 0 and 100