Class Defaults.TypeWithDefault<T>

java.lang.Object
de.hsh.graja.common.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 Details

    • 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.