Package | Description |
---|---|
java.text |
Provides classes and interfaces for handling text, dates, numbers, and messages
in a manner independent of natural languages.
|
java.time.format |
Provides classes to print and parse dates and times.
|
Modifier and Type | Method and Description |
---|---|
abstract Date |
DateFormat.parse(String source,
ParsePosition pos)
Parse a date/time string according to the given parse position.
|
Date |
SimpleDateFormat.parse(String text,
ParsePosition pos)
Parses text from a string to produce a
Date . |
Number |
DecimalFormat.parse(String text,
ParsePosition pos)
Parses text from a string to produce a
Number . |
Object[] |
MessageFormat.parse(String source,
ParsePosition pos)
Parses the string.
|
abstract Number |
NumberFormat.parse(String source,
ParsePosition parsePosition)
Returns a Long if possible (e.g., within the range [Long.MIN_VALUE,
Long.MAX_VALUE] and with no decimals), otherwise a Double.
|
Number |
ChoiceFormat.parse(String text,
ParsePosition status)
Parses a Number from the input text.
|
Object |
DateFormat.parseObject(String source,
ParsePosition pos)
Parses text from a string to produce a
Date . |
Object |
MessageFormat.parseObject(String source,
ParsePosition pos)
Parses text from a string to produce an object array.
|
Object |
NumberFormat.parseObject(String source,
ParsePosition pos)
Parses text from a string to produce a
Number . |
abstract Object |
Format.parseObject(String source,
ParsePosition pos)
Parses text from a string to produce an object.
|
Modifier and Type | Method and Description |
---|---|
TemporalAccessor |
DateTimeFormatter.parse(CharSequence text,
ParsePosition position)
Parses the text using this formatter, providing control over the text position.
|
TemporalAccessor |
DateTimeFormatter.parseUnresolved(CharSequence text,
ParsePosition position)
Parses the text using this formatter, without resolving the result, intended
for advanced use cases.
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.