Enum Class CharacterSet
java.lang.Object
java.lang.Enum<CharacterSet>
org.springframework.shell.test.jediterm.terminal.emulator.charset.CharacterSet
- All Implemented Interfaces:
Serializable
,Comparable<CharacterSet>
,Constable
Provides an enum with names for the supported character sets.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionabstract int
map
(int index) Maps the character with the given index to a character in this character set.static CharacterSet
valueOf
(char designation) Returns theCharacterSet
for the given character.static CharacterSet
Returns the enum constant of this class with the specified name.static CharacterSet[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ASCII
-
BRITISH
-
DANISH
-
DEC_SPECIAL_GRAPHICS
-
DEC_SUPPLEMENTAL
-
DUTCH
-
FINNISH
-
FRENCH
-
FRENCH_CANADIAN
-
GERMAN
-
ITALIAN
-
SPANISH
-
SWEDISH
-
SWISS
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
valueOf
Returns theCharacterSet
for the given character.- Parameters:
designation
- the character to translate to aCharacterSet
.- Returns:
- a character set name corresponding to the given character, defaulting to ASCII if no mapping could be made.
-
map
public abstract int map(int index) Maps the character with the given index to a character in this character set.- Parameters:
index
- the index of the character set, >= 0 && < 128.- Returns:
- a mapped character, or -1 if no mapping could be made and the ASCII value should be used.
-