public class Configs extends Object
Constructor and Description |
---|
Configs() |
Modifier and Type | Method and 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 . |
public static long valueOrDefault(Long value, long defaultValue)
value
if it is not null, otherwise returns the
defaultValue
.public static int valueOrDefault(Integer value, int defaultValue)
value
if it is not null, otherwise returns the
defaultValue
.public static boolean valueOrDefault(Boolean value, boolean defaultValue)
value
if it is not null, otherwise returns the
defaultValue
.public static <T> T valueOrDefault(T value, T defaultValue)
value
if it is not null, otherwise returns the
defaultValue
.Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.