java.text
Stay organized with collections
Save and categorize content based on your preferences.
Interfaces
Classes
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. |
BreakIterator |
The BreakIterator class implements methods for finding
the location of boundaries in text. |
ChoiceFormat |
A ChoiceFormat allows you to attach a format to a range of numbers. |
CollationKey |
A CollationKey represents a String under the
rules of a specific Collator object. |
Collator |
The Collator class performs locale-sensitive
String comparison. |
DateFormat |
DateFormat is 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 the
AttributedCharacterIterator returned
from DateFormat.formatToCharacterIterator and as
field identifiers in FieldPosition . |
DateFormatSymbols |
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. |
DecimalFormatSymbols |
This class represents the set of symbols (such as the decimal separator,
the grouping separator, and so on) needed by DecimalFormat
to format numbers. |
FieldPosition |
FieldPosition is a simple class used by Format
and its subclasses to identify fields in formatted output. |
Format |
Format is 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 the
AttributedCharacterIterator returned
from Format.formatToCharacterIterator and as
field identifiers in FieldPosition . |
MessageFormat |
MessageFormat provides a means to produce concatenated
messages in a language-neutral way. |
MessageFormat.Field |
Defines constants that are used as attribute keys in the
AttributedCharacterIterator returned
from MessageFormat.formatToCharacterIterator . |
Normalizer |
This class provides the method normalize which transforms Unicode
text into an equivalent composed or decomposed form, allowing for easier
sorting and searching of text. |
NumberFormat |
NumberFormat is the abstract base class for all number
formats. |
NumberFormat.Field |
Defines constants that are used as attribute keys in the
AttributedCharacterIterator returned
from NumberFormat.formatToCharacterIterator and as
field identifiers in FieldPosition . |
ParsePosition |
ParsePosition is a simple class used by Format
and its subclasses to keep track of the current position during parsing. |
SimpleDateFormat |
SimpleDateFormat is a concrete class for formatting and
parsing dates in a locale-sensitive manner. |
StringCharacterIterator |
StringCharacterIterator implements the
CharacterIterator protocol for a String . |
Enums
Exceptions
ParseException |
Signals that an error has been reached unexpectedly
while parsing. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ejava.text\u003c/code\u003e package provides classes and interfaces for handling text, dates, numbers, and messages in a locale-sensitive manner.\u003c/p\u003e\n"],["\u003cp\u003eIt includes functionalities for formatting, parsing, and manipulating textual data, such as breaking strings into words or sentences.\u003c/p\u003e\n"],["\u003cp\u003eThe package offers various classes for working with dates and times, including formatting and parsing them according to different locales.\u003c/p\u003e\n"],["\u003cp\u003eNumber formatting and parsing are also addressed, enabling the representation of numbers in various formats based on locale-specific conventions.\u003c/p\u003e\n"],["\u003cp\u003eClasses for handling messages are provided, allowing the creation and manipulation of messages that can be localized for different languages and regions.\u003c/p\u003e\n"]]],["The provided content details Java's text processing capabilities. `AttributedCharacterIterator` and `CharacterIterator` handle text iteration. Classes like `Annotation`, `AttributedString`, and `AttributedCharacterIterator.Attribute` manage text attributes. `BreakIterator` locates text boundaries. `Format`, `DateFormat`, `NumberFormat`, and `MessageFormat`, with their related fields, handle locale-sensitive formatting. `CollationKey` and `Collator` manage string comparison. `Normalizer` transforms Unicode text. `ParsePosition` and `ParseException` handle parsing.\n"],null,["Interfaces \n\n|----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| [AttributedCharacterIterator](../../../reference/java/text/AttributedCharacterIterator.html) | An `AttributedCharacterIterator` allows iteration through both text and related attribute information. |\n| [CharacterIterator](../../../reference/java/text/CharacterIterator.html) | This interface defines a protocol for bidirectional iteration over text. |\n\nClasses \n\n|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Annotation](../../../reference/java/text/Annotation.html) | An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics. |\n| [AttributedCharacterIterator.Attribute](../../../reference/java/text/AttributedCharacterIterator.Attribute.html) | Defines attribute keys that are used to identify text attributes. |\n| [AttributedString](../../../reference/java/text/AttributedString.html) | An AttributedString holds text and related attribute information. |\n| [BreakIterator](../../../reference/java/text/BreakIterator.html) | The `BreakIterator` class implements methods for finding the location of boundaries in text. |\n| [ChoiceFormat](../../../reference/java/text/ChoiceFormat.html) | A `ChoiceFormat` allows you to attach a format to a range of numbers. |\n| [CollationKey](../../../reference/java/text/CollationKey.html) | A `CollationKey` represents a `String` under the rules of a specific `Collator` object. |\n| [Collator](../../../reference/java/text/Collator.html) | The `Collator` class performs locale-sensitive `String` comparison. |\n| [DateFormat](../../../reference/java/text/DateFormat.html) | `DateFormat` is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner. |\n| [DateFormat.Field](../../../reference/java/text/DateFormat.Field.html) | Defines constants that are used as attribute keys in the `AttributedCharacterIterator` returned from `DateFormat.formatToCharacterIterator` and as field identifiers in `FieldPosition`. |\n| [DateFormatSymbols](../../../reference/java/text/DateFormatSymbols.html) | `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. |\n| [DecimalFormatSymbols](../../../reference/java/text/DecimalFormatSymbols.html) | This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by `DecimalFormat` to format numbers. |\n| [FieldPosition](../../../reference/java/text/FieldPosition.html) | `FieldPosition` is a simple class used by `Format` and its subclasses to identify fields in formatted output. |\n| [Format](../../../reference/java/text/Format.html) | `Format` is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers. |\n| [Format.Field](../../../reference/java/text/Format.Field.html) | Defines constants that are used as attribute keys in the `AttributedCharacterIterator` returned from `Format.formatToCharacterIterator` and as field identifiers in `FieldPosition`. |\n| [MessageFormat](../../../reference/java/text/MessageFormat.html) | `MessageFormat` provides a means to produce concatenated messages in a language-neutral way. |\n| [MessageFormat.Field](../../../reference/java/text/MessageFormat.Field.html) | Defines constants that are used as attribute keys in the `AttributedCharacterIterator` returned from `MessageFormat.formatToCharacterIterator`. |\n| [Normalizer](../../../reference/java/text/Normalizer.html) | This class provides the method `normalize` which transforms Unicode text into an equivalent composed or decomposed form, allowing for easier sorting and searching of text. |\n| [NumberFormat](../../../reference/java/text/NumberFormat.html) | `NumberFormat` is the abstract base class for all number formats. |\n| [NumberFormat.Field](../../../reference/java/text/NumberFormat.Field.html) | Defines constants that are used as attribute keys in the `AttributedCharacterIterator` returned from `NumberFormat.formatToCharacterIterator` and as field identifiers in `FieldPosition`. |\n| [ParsePosition](../../../reference/java/text/ParsePosition.html) | `ParsePosition` is a simple class used by `Format` and its subclasses to keep track of the current position during parsing. |\n| [SimpleDateFormat](../../../reference/java/text/SimpleDateFormat.html) | `SimpleDateFormat` is a concrete class for formatting and parsing dates in a locale-sensitive manner. |\n| [StringCharacterIterator](../../../reference/java/text/StringCharacterIterator.html) | `StringCharacterIterator` implements the `CharacterIterator` protocol for a `String`. |\n\nEnums \n\n|----------------------------------------------------------------------|------------------------------------------------------|\n| [Normalizer.Form](../../../reference/java/text/Normalizer.Form.html) | The normalization forms supported by the Normalizer. |\n\nExceptions \n\n|--------------------------------------------------------------------|--------------------------------------------------------------------|\n| [ParseException](../../../reference/java/text/ParseException.html) | Signals that an error has been reached unexpectedly while parsing. |"]]