public abstract class FloatDefault
extends java.lang.Object
Static functions to apply default values of type float
.
Constructor and Description |
---|
FloatDefault() |
Modifier and Type | Method and Description |
---|---|
static float |
ifNull(java.lang.Float value,
float defaultValue)
Return
value if it is not null , otherwise return defaultValue . |
static float |
zeroIfNull(java.lang.Float value)
Return
value if it is not null , otherwise return zero. |
public static float ifNull(java.lang.Float value, float defaultValue)
Return value
if it is not null
, otherwise return defaultValue
.
value
- (nullable) Nullable value.defaultValue
- Default value.value
if it is not null
, otherwise return defaultValue
.public static float zeroIfNull(java.lang.Float value)
Return value
if it is not null
, otherwise return zero.
value
- (nullable) Nullable value.value
if it is not null
, otherwise return zero.