Class PropertiesConfigAdapter<T>

  • Type Parameters:
    T - The properties type
    Direct Known Subclasses:
    StepRegistryPropertiesConfigAdapter

    public class PropertiesConfigAdapter<T>
    extends java.lang.Object
    Base class for properties to config adapters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected <V> V get​(java.util.function.Function<T,​V> getter, java.util.function.Supplier<V> fallback)
      Get the value from the properties or use a fallback from the defaults.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropertiesConfigAdapter

        public PropertiesConfigAdapter​(T properties)
        Create a new PropertiesConfigAdapter instance.
        Parameters:
        properties - the source properties
    • Method Detail

      • get

        protected final <V> V get​(java.util.function.Function<T,​V> getter,
                                  java.util.function.Supplier<V> fallback)
        Get the value from the properties or use a fallback from the defaults.
        Type Parameters:
        V - the value type
        Parameters:
        getter - the getter for the properties
        fallback - the fallback method, usually super interface method reference
        Returns:
        the property or fallback value