Package org.dalesbred.internal.utils
Class OptionalUtils
java.lang.Object
org.dalesbred.internal.utils.OptionalUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull OptionalDouble
optionalDoubleOfNullable
(@Nullable Double v) static @NotNull OptionalInt
optionalIntOfNullable
(@Nullable Integer v) static @NotNull OptionalLong
optionalLongOfNullable
(@Nullable Long v) static @Nullable Object
unwrapOptionalAsNull
(@Nullable Object o) If object is an empty optional-type, return null.
-
Method Details
-
unwrapOptionalAsNull
If object is an empty optional-type, return null. If object is non-empty optional-type, return its value. Otherwise return object as it is. -
optionalIntOfNullable
-
optionalLongOfNullable
-
optionalDoubleOfNullable
@NotNull public static @NotNull OptionalDouble optionalDoubleOfNullable(@Nullable @Nullable Double v)
-