Most visited

Recently visited

Added in API level 1

java.text

Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages. This means your main application or applet can be written to be language-independent, and it can rely upon separate, dynamically-linked localized resources. This allows the flexibility of adding localizations for new localizations at any time.

这些类能够格式化日期,数字和消息,解析; 搜索和排序字符串; 并遍历字符,单词,句子和换行符。 该软件包包含三个主要的类和接口组:

Interfaces

AttributedCharacterIterator AttributedCharacterIterator允许迭代文本和相关的属性信息。
CharacterIterator 该接口定义了一个用于文本双向迭代的协议。

Classes

Annotation 如果属性具有注释特性,则Annotation对象将用作文本属性值的包装。
AttributedCharacterIterator.Attribute 定义用于标识文本属性的属性键。
AttributedString AttributedString保存文本和相关的属性信息。
Bidi 这个类实现了Unicode双向算法。
BreakIterator BreakIterator类实现了在文本中查找边界位置的方法。
ChoiceFormat ChoiceFormat允许您将格式附加到一系列数字。
CollationElementIterator CollationElementIterator类用作遍历国际字符串的每个字符的迭代器。
CollationKey 甲 CollationKey表示 String下一个特定的规则 Collator对象。
Collator Collator类执行区域设置敏感的 String比较。
DateFormat DateFormat是日期/时间格式化子类的抽象类,它以独立于语言的方式格式化和解析日期或时间。
DateFormat.Field 定义了用于作为属性键常数 AttributedCharacterIterator从返回 DateFormat.formatToCharacterIterator和字段标识符在 FieldPosition 。
DateFormatSymbols DateFormatSymbols是封装可本地化的日期时间格式数据的公共类,例如月份名称,星期几名称和时区数据。
DecimalFormat DecimalFormat是格式为十进制数的 NumberFormat的具体子类。
DecimalFormatSymbols 此类表示 DecimalFormat用来格式化数字所需的一组符号(例如小数分隔符,分组分隔符等)。
FieldPosition FieldPosition是一个简单的类,由 Format及其子类用于标识格式化输出中的字段。
Format Format是用于格式化区域敏感信息(例如日期,消息和数字)的抽象基类。
Format.Field 定义了用于作为属性键常数 AttributedCharacterIterator从返回 Format.formatToCharacterIterator和字段标识符在 FieldPosition 。
MessageFormat MessageFormat提供了一种以与语言 MessageFormat的方式生成连接消息的方法。
MessageFormat.Field 定义从 MessageFormat.formatToCharacterIterator返回的 AttributedCharacterIterator中用作属性键的 MessageFormat.formatToCharacterIterator 。
Normalizer 该类提供方法 normalize ,它将Unicode文本转换为等效的组合或分解形式,从而可以更轻松地排序和搜索文本。
NumberFormat NumberFormat是所有数字格式的抽象基类。
NumberFormat.Field 定义了用于作为属性键常数 AttributedCharacterIterator从返回 NumberFormat.formatToCharacterIterator和字段标识符在 FieldPosition 。
ParsePosition ParsePosition是一个简单的类,由 Format及其子类用于在解析期间跟踪当前位置。
RuleBasedCollator RuleBasedCollator类是 RuleBasedCollator的一个具体子类,它提供了一个简单的数据驱动的表 Collator器。
SimpleDateFormat SimpleDateFormat是以区分语言敏感的方式格式化和解析日期的具体类。
StringCharacterIterator StringCharacterIterator实现 CharacterIterator协议为 String 。

Enums

Normalizer.Form 此枚举提供了 Unicode Standard Annex #15 — Unicode Normalization Forms中描述的四种Unicode规范化形式的 常量以及访问它们的两种方法。

Exceptions

ParseException 表示解析时出现意外错误。

Hooray!