/** * Removes all initialization parameters of this builder. This method can be * called if this builder is to be reused for creating result objects with a * different configuration. */ public void resetParameters() { setParameters(null); }
/** * {@inheritDoc} This implementation just records the fact that new * parameters have been set. This means that the next time a result object * is created, the {@code FileHandler} has to be initialized from * initialization parameters rather than reusing the existing one. */ @Override public synchronized BasicConfigurationBuilder<T> setParameters( final Map<String, Object> params) { super.setParameters(params); resetParameters = true; return this; }
/** * Appends the content of the specified {@code BuilderParameters} objects to * the current initialization parameters. Calling this method multiple times * will create a union of the parameters provided. * * @param params an arbitrary number of objects with builder parameters * @return a reference to this builder for method chaining * @throws NullPointerException if a <b>null</b> array is passed */ public BasicConfigurationBuilder<T> configure(final BuilderParameters... params) { final Map<String, Object> newParams = new HashMap<>(); for (final BuilderParameters p : params) { newParams.putAll(p.getParameters()); handleEventListenerProviders(p); } return setParameters(newParams); }