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

com.github.dxee.dject.feature.DjectFeature Maven / Gradle / Ivy

package com.github.dxee.dject.feature;

public class DjectFeature {
    private final String key;
    private final T defaultValue;
    
    public static  DjectFeature create(String key, T defaultValue) {
        return new DjectFeature(key, defaultValue);
    }
    
    public DjectFeature(String key, T defaultValue) {
        this.key = key;
        this.defaultValue = defaultValue;
    }
    
    public String getKey() {
        return key;
    }
    
    @SuppressWarnings("unchecked")
    public Class getType() {
        return (Class) defaultValue.getClass();
    }
    
    public T getDefaultValue() {
        return defaultValue;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy