All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.finn.unleash.strategy.Strategy Maven / Gradle / Ivy

There is a newer version: 4.4.1
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy