public abstract class ShortDefault
extends java.lang.Object
Static functions to apply default values of type short
.
Constructor and Description |
---|
ShortDefault() |
Modifier and Type | Method and Description |
---|---|
static short |
ifNull(java.lang.Short value,
short defaultValue)
Return
value if it is not null , otherwise return defaultValue . |
static short |
zeroIfNull(java.lang.Short value)
Return
value if it is not null , otherwise return zero. |
public static short ifNull(java.lang.Short value, short 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 short zeroIfNull(java.lang.Short value)
Return value
if it is not null
, otherwise return zero.
value
- (nullable) Nullable value.value
if it is not null
, otherwise return zero.