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

io.getunleash.strategy.Strategy Maven / Gradle / Ivy

There is a newer version: 9.2.6
Show newest version
package io.getunleash.strategy;

import io.getunleash.Constraint;
import io.getunleash.UnleashContext;
import java.util.List;
import java.util.Map;

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 - 2025 Weber Informatics LLC | Privacy Policy