Class ChameleonUtil


  • @Internal
    @Experimental
    public final class ChameleonUtil
    extends Object
    Chameleon internal utilities.
    • 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:
        s if not null, otherwise defaultValue.