Module java.base
Package 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.
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:
- Classes for iteration over text
- Classes for formatting and parsing
- Classes for string collation
- Since:
- 1.1
-
Interface Summary Interface Description AttributedCharacterIterator AnAttributedCharacterIteratorallows iteration through both text and related attribute information.CharacterIterator This interface defines a protocol for bidirectional iteration over text. -
Class Summary Class Description 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.Bidi This class implements the Unicode Bidirectional Algorithm.BreakIterator TheBreakIteratorclass implements methods for finding the location of boundaries in text.ChoiceFormat AChoiceFormatallows you to attach a format to a range of numbers.CollationElementIterator TheCollationElementIteratorclass is used as an iterator to walk through each character of an international string.CollationKey ACollationKeyrepresents aStringunder the rules of a specificCollatorobject.Collator TheCollatorclass performs locale-sensitiveStringcomparison.DateFormat DateFormatis an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.DateFormat.Field Defines constants that are used as attribute keys in theAttributedCharacterIteratorreturned fromDateFormat.formatToCharacterIteratorand as field identifiers inFieldPosition.DateFormatSymbols DateFormatSymbolsis a public class for encapsulating localizable date-time formatting data, such as the names of the months, the names of the days of the week, and the time zone data.DecimalFormat DecimalFormatis a concrete subclass ofNumberFormatthat formats decimal numbers.DecimalFormatSymbols This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed byDecimalFormatto format numbers.FieldPosition FieldPositionis a simple class used byFormatand its subclasses to identify fields in formatted output.Format Formatis an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.Format.Field Defines constants that are used as attribute keys in theAttributedCharacterIteratorreturned fromFormat.formatToCharacterIteratorand as field identifiers inFieldPosition.MessageFormat MessageFormatprovides a means to produce concatenated messages in a language-neutral way.MessageFormat.Field Defines constants that are used as attribute keys in theAttributedCharacterIteratorreturned fromMessageFormat.formatToCharacterIterator.Normalizer This class provides the methodnormalizewhich transforms Unicode text into an equivalent composed or decomposed form, allowing for easier sorting and searching of text.NumberFormat NumberFormatis the abstract base class for all number formats.NumberFormat.Field Defines constants that are used as attribute keys in theAttributedCharacterIteratorreturned fromNumberFormat.formatToCharacterIteratorand as field identifiers inFieldPosition.ParsePosition ParsePositionis a simple class used byFormatand its subclasses to keep track of the current position during parsing.RuleBasedCollator TheRuleBasedCollatorclass is a concrete subclass ofCollatorthat provides a simple, data-driven, table collator.SimpleDateFormat SimpleDateFormatis a concrete class for formatting and parsing dates in a locale-sensitive manner.StringCharacterIterator StringCharacterIteratorimplements theCharacterIteratorprotocol for aString. -
Enum Summary Enum Description Normalizer.Form This enum provides constants of the four Unicode normalization forms that are described in Unicode Standard Annex #15 — Unicode Normalization Forms and two methods to access them. -
Exception Summary Exception Description ParseException Signals that an error has been reached unexpectedly while parsing.