Class Defaults.TypeWithDefault<T>

  • Type Parameters:
    T - The type of the value.
    Enclosing class:
    Defaults

    public static class Defaults.TypeWithDefault<T>
    extends Object
    A default value od type T.
    • Method Detail

      • getValOrDefault

        public T getValOrDefault​(T val)
        Parameters:
        val - a value, that is given and checked, if it is null.
        Returns:
        if the parameter val is not null, returns val, otherwise the default value is returned.
      • getDefault

        public T getDefault()
        Returns:
        the default value.