com.makitoo.internal.UserConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of feature-flag Show documentation
Show all versions of feature-flag Show documentation
The Java client for Makitoo feature handling.
The newest version!
package com.makitoo.internal;
import com.makitoo.User;
import java.util.HashMap;
import java.util.Map;
/**
* Created by nicolas on 23/01/17.
*/
public class UserConfiguration {
private final User user;
private Map configuration = new HashMap();
public UserConfiguration(User user) {
this.user = user;
}
public UserConfiguration withConfiguration(String featureName, Boolean value) {
configuration.put(featureName, value);
return this;
}
public User getUser() {
return user;
}
public Map getConfiguration() {
return configuration;
}
public void setConfiguration(Map configuration) {
this.configuration = configuration;
}
public Boolean isActive(String featureName) {
return configuration.get(featureName);
}
}