Interface SettingKey.SettingKeyBuilder<T>

Type Parameters:
T - the type of value associated with this key
Enclosing interface:
SettingKey<T>

@ExperimentalApi public static interface SettingKey.SettingKeyBuilder<T>
A builder for creating custom keys.
Since:
2.12.0
  • Method Details

    • ofType

      Specifies the value's type.
      Parameters:
      type - of value
      Returns:
      key builder
      Since:
      2.12.0
    • withPropertyKey

      SettingKey.SettingKeyBuilder<T> withPropertyKey(String propertyKey)
      Specifies the property key.

      When defining custom keys, it is advisable to use a custom prefix to distinguish from and to avoid potential clashes with built-in keys, for example:

      
         com.acme.string.length=10
       

      If withPropertyKey() is not specified, then an auto-generated property key will be assigned.

      Parameters:
      propertyKey - a unique property key
      Returns:
      key builder
      Since:
      2.12.0
    • create

      SettingKey<T> create()
      Returns the created setting key.
      Returns:
      the setting key
      Since:
      2.12.0