public enum I18n extends Enum<I18n>
This class will be instantiated only once and will use the JVM's default locale.
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
String |
get(String key)
Returns the resource for the key passed in parameters.
|
static I18n |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static I18n[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final I18n INSTANCE
public static final String UTF8
public static I18n[] values()
for (I18n c : I18n.values()) System.out.println(c);
public static I18n valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String get(String key)
If the key is not found, returns an empty string.
key
- a String representing the key we want to get the resource from.Copyright © 2015. All rights reserved.