Stay organized with collections
Save and categorize content based on your preferences.
abstract class UFormat : Format
Known Indirect Subclasses
|
An abstract class that extends java.text.Format
to provide additional ICU protocol, specifically, the getLocale() API. All ICU format classes are subclasses of this class.
Summary
Public constructors |
Default constructor.
|
Inherited functions |
From class Format
Any |
clone()
Creates and returns a copy of this object.
|
String! |
format(obj: Any!)
Formats an object to produce a string. This is equivalent to format (obj, new StringBuffer(), new FieldPosition(0)).toString();
|
StringBuffer! |
format(obj: Any!, toAppendTo: StringBuffer!, pos: FieldPosition!)
Formats an object and appends the resulting text to a given string buffer. If the pos argument identifies a field used by the format, then its indices are set to the beginning and end of the first such field encountered.
|
AttributedCharacterIterator! |
formatToCharacterIterator(obj: Any!)
Formats an Object producing an AttributedCharacterIterator . You can use the returned AttributedCharacterIterator to build the resulting String, as well as to determine information about the resulting String.
Each attribute key of the AttributedCharacterIterator will be of type Field . It is up to each Format implementation to define what the legal values are for each attribute in the AttributedCharacterIterator , but typically the attribute key is also used as the attribute value.
The default implementation creates an AttributedCharacterIterator with no attributes. Subclasses that support fields should override this and create an AttributedCharacterIterator with meaningful attributes.
|
Any! |
parseObject(source: String!)
Parses text from the beginning of the given string to produce an object. The method may not use the entire text of the given string.
|
Any! |
parseObject(source: String!, pos: ParsePosition!)
Parses text from a string to produce an object.
The method attempts to parse text starting at the index given by pos . If parsing succeeds, then the index of pos is updated to the index after the last character used (parsing does not necessarily use all characters up to the end of the string), and the parsed object is returned. The updated pos can be used to indicate the starting point for the next call to this method. If an error occurs, then the index of pos is not changed, the error index of pos is set to the index of the character where the error occurred, and null is returned.
|
|
Public constructors
UFormat()
Default constructor.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-18 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-12-18 UTC."],[],[]]