Class Utils


  • public class Utils
    extends Object
    Created by User on 26.05.2017.
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • defaultStringIfNull

        public static String defaultStringIfNull​(com.google.gson.JsonElement jsonElement)
      • defaultStringIfNull

        public static String defaultStringIfNull​(com.google.gson.JsonElement jsonElement,
                                                 String defaultValue)
      • defaultUuidIfNull

        public static UUID defaultUuidIfNull​(com.google.gson.JsonElement jsonElement,
                                             UUID defaultValue)
      • defaultIntIfNull

        public static int defaultIntIfNull​(com.google.gson.JsonElement jsonElement,
                                           int defaultValue)
      • defaultLongIfNull

        public static long defaultLongIfNull​(com.google.gson.JsonElement jsonElement,
                                             long defaultValue)
      • defaultElapsedIfNull

        public static String defaultElapsedIfNull​(com.google.gson.JsonElement rawElapsed)
      • defaultDoubleIfNull

        public static double defaultDoubleIfNull​(com.google.gson.JsonElement jsonElement,
                                                 double defaultValue)
      • defaultBooleanIfNull

        public static boolean defaultBooleanIfNull​(com.google.gson.JsonElement rawBoolean,
                                                   boolean defaultValue)
      • tryAddToMap

        public static <TKey,​TValue> boolean tryAddToMap​(Map<TKey,​TValue> map,
                                                              TKey key,
                                                              TValue value)
      • isBlank

        public static boolean isBlank​(String str)