no.finn.unleash.strategy.Strategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unleash-client-java Show documentation
Show all versions of unleash-client-java Show documentation
A client library for Unleash
package no.finn.unleash.strategy;
import java.util.List;
import java.util.Map;
import no.finn.unleash.Constraint;
import no.finn.unleash.UnleashContext;
public interface Strategy {
String getName();
boolean isEnabled(Map parameters);
default boolean isEnabled(Map parameters, UnleashContext unleashContext) {
return isEnabled(parameters);
}
default boolean isEnabled(Map parameters, UnleashContext unleashContext, List constraints) {
return ConstraintUtil.validate(constraints, unleashContext) && isEnabled(parameters, unleashContext);
}
}