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

com.github.cloudyrock.dimmer.FeatureMetadata Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.2.2
Show newest version
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