Interface DefaultValues<V>

Type Parameters:
V - the value type

public interface DefaultValues<V>
Storage for default values
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull V
    Gets the default value
    @NonNull V
    Gets the value if missing in an existing configuration
    static <V> @NonNull DefaultValues<V>
    simple(@NonNull V defaultValue)
    Creates a simple implementation from the given value.
  • Method Details

    • defaultValue

      @NonNull V defaultValue()
      Gets the default value
      Returns:
      the default value
    • ifMissing

      @NonNull V ifMissing()
      Gets the value if missing in an existing configuration
      Returns:
      the value if missing
    • simple

      static <V> @NonNull DefaultValues<V> simple(@NonNull V defaultValue)
      Creates a simple implementation from the given value.

      The value provided doubles as the default value and the missing value.

      Type Parameters:
      V - the type being provided
      Parameters:
      defaultValue - the value to use
      Returns:
      a default values implementation