Package dev.hypera.chameleon.util
Class ChameleonUtil
- java.lang.Object
-
- dev.hypera.chameleon.util.ChameleonUtil
-
@Internal @Experimental public final class ChameleonUtil extends Object
Chameleon internal utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TgetOrDefault(T s, T defaultValue)Check if first argument is null, return it if it isn't, otherwise return the default value.
-
-
-
Method Detail
-
getOrDefault
@NotNull public static <T> T getOrDefault(@Nullable T s, @NotNull T defaultValue)Check if first argument is null, return it if it isn't, otherwise return the default value.- Type Parameters:
T- Type.- Parameters:
s- Object to check if null.defaultValue- Default return value.- Returns:
sif not null, otherwisedefaultValue.
-
-