com.github.yin.flags.FlagID Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-flags Show documentation
Show all versions of java-flags Show documentation
Easy to use command-line parser, which enables you to
define cmdline flags directly the class they are used in.
package com.github.yin.flags;
import com.google.auto.value.AutoValue;
import javax.annotation.Nonnull;
/**
* @author yin
*/
@AutoValue
public abstract class FlagID implements Comparable {
public static FlagID create(String className, String flagName) {
return new AutoValue_FlagID(className, flagName);
}
public abstract String className();
public abstract String flagName();
public final String fqn() {
return className() + '.' + flagName();
}
public int compareTo(@Nonnull FlagID that) {
return fqn().compareTo(that.fqn());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy