com.github.cloudyrock.dimmer.FeatureMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dimmer-core Show documentation
Show all versions of dimmer-core Show documentation
Lightweight library to manage feature toggling. Unlike others Dimmer doesn't work
in switch mode, black or white, It provides a flexible way to respond to disabled
features by adding customizable behaviours and pre-configured responses.
package com.github.cloudyrock.dimmer;
abstract class FeatureMetadata {
private final String feature;
protected FeatureMetadata(String feature) {
if (feature == null || feature.isEmpty()) {
throw new IllegalArgumentException("Feature cannot be null or empty");
}
this.feature = feature;
}
public String getFeature() {
return feature;
}
@Override
public boolean equals(Object o) {
return this == o
|| o != null && getClass() == o.getClass()
&& feature.equals(((FeatureMetadata) o).feature);
}
@Override
public int hashCode() {
return feature.hashCode();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy