Class Configs

java.lang.Object
org.apache.druid.common.config.Configs

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    valueOrDefault(Boolean value, boolean defaultValue)
    Returns the given value if it is not null, otherwise returns the defaultValue.
    static int
    valueOrDefault(Integer value, int defaultValue)
    Returns the given value if it is not null, otherwise returns the defaultValue.
    static long
    valueOrDefault(Long value, long defaultValue)
    Returns the given value if it is not null, otherwise returns the defaultValue.
    static <T> T
    valueOrDefault(T value, T defaultValue)
    Returns the given value if it is not null, otherwise returns the defaultValue.

    Methods inherited from class java.lang.Object

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

    • Configs

      public Configs()
  • Method Details

    • 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.