public enum ToneType extends Enum<ToneType>
Chinese has four pitched tones and a "toneless" tone. They are called Píng(平, flat), Shǎng(上, rise), Qù(去, high drop), Rù(入, drop) and Qing(轻, toneless). Usually, we use 1, 2, 3, 4 and 5 to represent them.
This class provides several options for output of Chinese tones, which are listed below. For example, Chinese character '打'
| Options | Output |
|---|---|
| WITH_TONE_NUMBER | da3 |
| WITHOUT_TONE | da |
| WITH_TONE_MARK | dǎ |
| Enum Constant and Description |
|---|
WITH_ABBR
'打' -> d
|
WITH_TONE_MARK
'打' -> dǎ
|
WITH_TONE_NUMBER
'打' -> da3
|
WITHOUT_TONE
'打' -> da
|
| Modifier and Type | Method and Description |
|---|---|
static ToneType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ToneType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ToneType WITH_TONE_NUMBER
public static final ToneType WITHOUT_TONE
public static final ToneType WITH_TONE_MARK
public static final ToneType WITH_ABBR
public static ToneType[] values()
for (ToneType c : ToneType.values()) System.out.println(c);
public static ToneType 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 nullCopyright © 2016. All rights reserved.