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

com.github.yin.flags.FlagID Maven / Gradle / Ivy

Go to download

Easy to use command-line parser, which enables you to define cmdline flags directly the class they are used in.

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