Package org.apache.druid.common.config
Class Configs
java.lang.Object
org.apache.druid.common.config.Configs
Utility class for common config operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
Configs
public Configs()
-
-
Method Details
-
valueOrDefault
Returns the givenvalueif it is not null, otherwise returns thedefaultValue. -
valueOrDefault
Returns the givenvalueif it is not null, otherwise returns thedefaultValue. -
valueOrDefault
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.
-