public class PonderationStrategy extends AbstractFlipStrategy
| Constructor and Description |
|---|
PonderationStrategy()
Default Constructor.
|
PonderationStrategy(double threshold)
Parameterized constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(String featureName,
FeatureStore currentStore,
FlippingExecutionContext executionContext)
Tell if flip should be realized.
|
void |
init(String featureName,
Map<String,String> initParams)
Allow to parameterized Flipping Strategy
|
void |
setWeight(double weight)
Setter accessor for attribute 'weight'.
|
assertRequiredParameter, getInitParams, getType, toStringpublic PonderationStrategy()
public PonderationStrategy(double threshold)
threshold - thresholdpublic void init(String featureName, Map<String,String> initParams)
init in interface FlippingStrategyinit in class AbstractFlipStrategyfeatureName - current featureNamepublic boolean evaluate(String featureName, FeatureStore currentStore, FlippingExecutionContext executionContext)
featureName - target featureNameexecutionContext - custom params to make decisionpublic void setWeight(double weight)
weight - new value for 'weight 'Copyright © 2013–2015 FF4J. All rights reserved.