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

com.darwinsys.geo.Language Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
package com.darwinsys.geo;

/** Woefully-incomplete list of languages
 */
@SuppressWarnings("javadoc")
public enum Language {
	en("English"),
	cn_tw("Chinese(Cantonese)"),
	cn_zh("Chinese(Mandarin)"),
	cz("Czech"),
	de("German"),
	es("Spanish"),
	fr("French"),
	jp("Japanese"),
	kr("Korean"),
	pl("Polish"),
	ru("Russian"),
	uk("Ukrainian");

	private final String name;

	private Language(String name) {
		this.name = name;
	}

	@Override public String toString() {
		return name;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		throw new IllegalArgumentException("enums are immutable");
	}

	public static Language valueOfIgnoreCase(String name) {
		for (Language cp : values()) {
			if (cp.name.equalsIgnoreCase(name)) {
				return cp;
			}
		}
		throw new IllegalArgumentException("Unknown language " + name);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy