OptionController (@NotNull Function<@NotNull String, Object> getter, @NotNull BiConsumer<@NotNull String, Object> setter) { return new OptionController() { @Override public void setOption(@NotNull String bindId, Object value) { setter.accept(bindId, value); } @Override public Object getOption(@NotNull String bindId) { return getter.apply(bindId); } }; }