Class Configs


  • public class Configs
    extends Object
    Utility class for common config operations.
    • Constructor Detail

      • Configs

        public Configs()
    • Method Detail

      • valueOrDefault

        public static long valueOrDefault​(Long value,
                                          long defaultValue)
        Returns the given value if it is not null, otherwise returns the defaultValue.
      • valueOrDefault

        public static int valueOrDefault​(Integer value,
                                         int defaultValue)
        Returns the given value if it is not null, otherwise returns the defaultValue.
      • valueOrDefault

        public static boolean valueOrDefault​(Boolean value,
                                             boolean defaultValue)
        Returns the given value if it is not null, otherwise returns the defaultValue.
      • valueOrDefault

        public static <T> T valueOrDefault​(T value,
                                           T defaultValue)
        Returns the given value if it is not null, otherwise returns the defaultValue.