콘텐츠로 건너뛰기

자주 방문한 페이지

최근 방문한 페이지

navigation
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.

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

Interfaces

AttributedCharacterIterator An AttributedCharacterIterator allows iteration through both text and related attribute information. 
CharacterIterator This interface defines a protocol for bidirectional iteration over text. 

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. 
Bidi This class implements the Unicode Bidirectional Algorithm. 
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. 
CollationElementIterator The CollationElementIterator class is used as an iterator to walk through each character of an international string. 
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. 
DecimalFormat DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers. 
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. 
RuleBasedCollator The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator. 
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

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. 

Exceptions

ParseException Signals that an error has been reached unexpectedly while parsing. 
이 사이트는 쿠키를 사용하여 사이트별 언어 및 표시 옵션에 대한 환경설정을 저장합니다.

Google Play에서 성공을 거두는 데 도움이 되는 최신 Android 개발자 뉴스 및 도움말을 받아 보세요.

* 필수 입력란

완료되었습니다.

WeChat에서 Google Developers 팔로우하기

이 사이트를 (으)로 탐색할까요?

페이지를 요청했지만 이 사이트의 언어 환경설정은 입니다.

언어 환경설정을 변경하고 이 사이트를 (으)로 탐색할까요? 언어 환경설정을 나중에 변경하려면 각 페이지 하단의 언어 메뉴를 사용하세요.

이 클래스를 사용하려면 API 수준 이상이 필요합니다.

문서에 대해 선택한 API 수준이 이므로 이 문서가 표시되지 않습니다. 왼쪽 탐색 메뉴의 선택기로 문서 API 수준을 변경할 수 있습니다.

앱에 필요한 API 수준 지정에 관한 자세한 내용은 다양한 플랫폼 버전 지원을 참조하세요.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)