Class ConfigReloadContainer.Builder<V>

  • Enclosing class:
    ConfigReloadContainer<V>

    public static class ConfigReloadContainer.Builder<V>
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder​(java.lang.Class<V> clazz)
    • Method Detail

      • withFolder

        public ConfigReloadContainer.Builder<V> withFolder​(java.util.function.BiConsumer<V,​V> folder)
        Note: this method assumes the object being managed by this container is mutable and can be used for accumulation. This simplifies the usage of clients by allowing them to provide a consumer for accumulation purposes rather than a function. Should this container ever need to manage immutable objects an additional method should be provided which accepts a BinaryOperator rather than a BiConsumer.
        Parameters:
        folder - a consumer which given an accumulator and the next value, folds the next value into the accumulator such that the accumulator now represents the merger of both objects