org.wildfly.swarm.config.singleton.SingletonPolicyConsumer Maven / Gradle / Ivy
The newest version!
package org.wildfly.swarm.config.singleton;
import org.wildfly.swarm.config.singleton.SingletonPolicy;
import java.lang.FunctionalInterface;
@FunctionalInterface
public interface SingletonPolicyConsumer> {
/**
* Configure a pre-constructed instance of SingletonPolicy resource
*
* @parameter Instance of SingletonPolicy to configure
* @return nothing
*/
void accept(T value);
default SingletonPolicyConsumer andThen(SingletonPolicyConsumer after) {
return (c) -> {
this.accept(c);
after.accept(c);
};
}
}