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

xsbti.Predefined Maven / Gradle / Ivy

There is a newer version: 0.13.15
Show newest version
package xsbti;

public enum Predefined 
{
	Local("local"),
	MavenLocal("maven-local"),
	MavenCentral("maven-central"),
	ScalaToolsReleases("scala-tools-releases"),
	ScalaToolsSnapshots("scala-tools-snapshots"),
	SonatypeOSSReleases("sonatype-oss-releases"),
	SonatypeOSSSnapshots("sonatype-oss-snapshots");

	private final String label;
	private Predefined(String label) { this.label = label; }
	public String toString() { return label; }

	public static Predefined toValue(String s)
	{
		for(Predefined p : values())
			if(s.equals(p.toString()))
				return p;
		
		StringBuilder msg = new StringBuilder("Expected one of ");
		for(Predefined p : values())
			msg.append(p.toString()).append(", ");
		msg.append("got '").append(s).append("'.");
		throw new RuntimeException(msg.toString());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy