Module java.base
Package java.text
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
-
ClassDescriptionAn Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics.An
AttributedCharacterIterator
allows iteration through both text and related attribute information.Defines attribute keys that are used to identify text attributes.An AttributedString holds text and related attribute information.This class implements the Unicode Bidirectional Algorithm.TheBreakIterator
class implements methods for finding the location of boundaries in text.This interface defines a protocol for bidirectional iteration over text.ChoiceFormat
is a concrete subclass ofNumberFormat
that allows you to attach a format to a range of numbers.TheCollationElementIterator
class is used as an iterator to walk through each character of an international string.ACollationKey
represents aString
under the rules of a specificCollator
object.TheCollator
class performs locale-sensitiveString
comparison.CompactNumberFormat
is a concrete subclass ofNumberFormat
that formats a decimal number in its compact form.DateFormat
is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.Defines constants that are used as attribute keys in theAttributedCharacterIterator
returned fromDateFormat.formatToCharacterIterator
and as field identifiers inFieldPosition
.DateFormatSymbols
is 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
is a concrete subclass ofNumberFormat
that formats decimal numbers.This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed byDecimalFormat
to format numbers.FieldPosition
is a simple class used byFormat
and its subclasses to identify fields in formatted output.Format
is an abstract base class for formatting locale-sensitive information such as dates, messages, numbers, and lists.Defines constants that are used as attribute keys in theAttributedCharacterIterator
returned fromFormat.formatToCharacterIterator
and as field identifiers inFieldPosition
.ListFormat
formats or parses a list of strings in a locale-sensitive way.MessageFormat
provides a means to produce concatenated messages in a language-neutral way.Defines constants that are used as attribute keys in theAttributedCharacterIterator
returned fromMessageFormat.formatToCharacterIterator
.This class provides the methodnormalize
which transforms Unicode text into an equivalent composed or decomposed form, allowing for easier sorting and searching of text.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.NumberFormat
is the abstract base class for all number formats.Defines constants that are used as attribute keys in theAttributedCharacterIterator
returned fromNumberFormat.formatToCharacterIterator
and as field identifiers inFieldPosition
.A number format style.Signals that an error has been reached unexpectedly while parsing.ParsePosition
is a simple class used byFormat
and its subclasses to keep track of the current position during parsing.TheRuleBasedCollator
class is a concrete subclass ofCollator
that provides a simple, data-driven, table collator.SimpleDateFormat
is a concrete class for formatting and parsing dates in a locale-sensitive manner.StringCharacterIterator
implements theCharacterIterator
protocol for aString
.