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ǎ |
| 枚举常量和说明 |
|---|
WITH_ABBR
'打' -> d
|
WITH_TONE_MARK
'打' -> dǎ
|
WITH_TONE_NUMBER
'打' -> da3
|
WITHOUT_TONE
'打' -> da
|
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 - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量,
则抛出 IllegalArgumentExceptionNullPointerException - 如果参数为空值, 则抛出 NullPointerExceptionCopyright © 2014. All rights reserved.