com.makitoo.Feature 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;
/**
* Created by nicolas on 23/01/17.
*/
public class Feature {
private final String name;
private boolean defaultValue;
public Feature(String name) {
this.name = name;
}
public Feature withDefaultValue(boolean value) {
defaultValue = value;
return this;
}
public String getName() {
return name;
}
public boolean getDefaultValue() {
return defaultValue;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Feature feature = (Feature) o;
return name != null ? name.equals(feature.name) : feature.name == null;
}
@Override
public int hashCode() {
return name != null ? name.hashCode() : 0;
}
}