Package org.apache.druid.common.config
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 Configs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanvalueOrDefault(Boolean value, boolean defaultValue)Returns the givenvalueif it is not null, otherwise returns thedefaultValue.static intvalueOrDefault(Integer value, int defaultValue)Returns the givenvalueif it is not null, otherwise returns thedefaultValue.static longvalueOrDefault(Long value, long defaultValue)Returns the givenvalueif it is not null, otherwise returns thedefaultValue.static <T> TvalueOrDefault(T value, T defaultValue)Returns the givenvalueif it is not null, otherwise returns thedefaultValue.
-
-
-
Method Detail
-
valueOrDefault
public static long valueOrDefault(Long value, long defaultValue)
Returns the givenvalueif it is not null, otherwise returns thedefaultValue.
-
valueOrDefault
public static int valueOrDefault(Integer value, int defaultValue)
Returns the givenvalueif it is not null, otherwise returns thedefaultValue.
-
valueOrDefault
public static boolean valueOrDefault(Boolean value, boolean defaultValue)
Returns the givenvalueif it is not null, otherwise returns thedefaultValue.
-
valueOrDefault
public static <T> T valueOrDefault(T value, T defaultValue)Returns the givenvalueif it is not null, otherwise returns thedefaultValue.
-
-