|AttributedCharacterIterator||An AttributedCharacterIterator allows iteration through both text and related attribute information.|
|CharacterIterator||This interface defines a protocol for bidirectional iteration over text.|
|Annotation||An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics.|
|AttributedCharacterIterator.Attribute||Defines attribute keys that are used to identify text attributes.|
|AttributedString||An AttributedString holds text and related attribute information.|
|DateFormat||DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.|
|DecimalFormatSymbols||This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by
|ParseException||Signals that an error has been reached unexpectedly while parsing.|
Provides classes and interfaces for handling text, dates, numbers, currency, messages and collation 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.
These classes are capable of formatting dates, numbers, and messages, parsing; searching and sorting strings; and iterating over characters, words, sentences, and line breaks. This package contains three main groups of classes and interfaces:
Formatting and ParsingFormattingParsing
Dates and numbers are represented internally in a locale-independent way. For example, dates are kept as milliseconds since January 1, 1970, 00:00:00 UCT. When these objects are printed or displayed, they must be converted to localized strings. The locale-specific parts of a date string, such as the time zone string, are separately imported from a locale-specific resource bundle.
format() method converts the
Date object from -604656780000 milliseconds to the form "Tuesday, November 3, 1997 9:47am CST" for the U. S. English locale. The figure shows how the
format() method of subclasses of
Format enable instances of
String, and other objects to be formatted to locale-specific strings.
parseObject() method (and
parse() method in subclasses) perform the reverse operation of parsing localized strings and converting them to
String objects. The figure shows how the
parse() method is complementary to
String formatted by
format() is guaranteed to be parseable by
Java provides six subclasses of
Format for formatting dates, numbers, and messages:
Collator is an abstract base class. Subclasses implement specific collation strategies. One subclass,
RuleBasedCollator, is currently provided and is applicable to a wide set of languages. Other subclasses may be created to handle more specialized needs.
CollationElementIterator provides an iterator for stepping through each character of a locale-specific string according to the rules of a specific
CollationKey enables fast sorting of strings by representing a string as a sort key under the rules of a specific
|Locale-Sensitive Classes||Locale-Independent Classes|