cdc.perfs.api.MeasureLevel Maven / Gradle / Ivy
package cdc.perfs.api;
import cdc.util.encoding.Encoded;
import cdc.util.encoding.Encoder;
import cdc.util.encoding.Encoders;
/**
* Enumeration of possible measure levels.
*
* They are enumerated from most important (less verbose) to less important
* (more verbose).
*
* @author Damien Carbonne
*/
public enum MeasureLevel implements Encoded {
/**
* Most important level (less verbose level).
*/
INFO("Info", 'I'),
MAJOR("Major", 'M'),
MINOR("Minor", 'm'),
MICRO("Micro", 'u'),
/**
* Less important level (more verbose)
*/
DEBUG("Debug", 'D');
private final String label;
private final Character code;
private MeasureLevel(String label,
char code) {
this.label = label;
this.code = code;
}
public static final Encoder ENCODER = Encoders.encoder(MeasureLevel.class, Character.class);
public String getLabel() {
return label;
}
@Override
public Character getCode() {
return code;
}
}