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 boolean
valueOrDefault(Boolean value, boolean defaultValue)
Returns the givenvalue
if it is not null, otherwise returns thedefaultValue
.static int
valueOrDefault(Integer value, int defaultValue)
Returns the givenvalue
if it is not null, otherwise returns thedefaultValue
.static long
valueOrDefault(Long value, long defaultValue)
Returns the givenvalue
if it is not null, otherwise returns thedefaultValue
.static <T> T
valueOrDefault(T value, T defaultValue)
Returns the givenvalue
if it is not null, otherwise returns thedefaultValue
.
-
-
-
Method Detail
-
valueOrDefault
public static long valueOrDefault(Long value, long defaultValue)
Returns the givenvalue
if it is not null, otherwise returns thedefaultValue
.
-
valueOrDefault
public static int valueOrDefault(Integer value, int defaultValue)
Returns the givenvalue
if it is not null, otherwise returns thedefaultValue
.
-
valueOrDefault
public static boolean valueOrDefault(Boolean value, boolean defaultValue)
Returns the givenvalue
if it is not null, otherwise returns thedefaultValue
.
-
valueOrDefault
public static <T> T valueOrDefault(T value, T defaultValue)
Returns the givenvalue
if it is not null, otherwise returns thedefaultValue
.
-
-