public final class FormattedText extends Object implements Text
There is no thread-safety guarantee.
Text.NoNulls
Constructor and Description |
---|
FormattedText(String ptn,
Collection<Object> arguments)
New formatted string with default locale.
|
FormattedText(String ptn,
Locale locale,
Collection<Object> arguments)
New formatted string with specified locale.
|
FormattedText(String ptn,
Locale locale,
Object... arguments)
New formatted string with specified locale.
|
FormattedText(String ptn,
Object... arguments)
New formatted string with default locale.
|
FormattedText(Text ptn,
Collection<Object> arguments)
New formatted string with default locale.
|
FormattedText(Text ptn,
Locale locale,
Collection<Object> arguments)
New formatted string with specified locale.
|
FormattedText(Text ptn,
Locale locale,
Object... arguments)
New formatted string with specified locale.
|
FormattedText(Text ptn,
Object... arguments)
New formatted string with default locale.
|
Modifier and Type | Method and Description |
---|---|
String |
asString()
Convert it to the string.
|
int |
compareTo(Text text) |
public FormattedText(String ptn, Object... arguments)
ptn
- Patternarguments
- Argumentspublic FormattedText(Text ptn, Object... arguments)
ptn
- Patternarguments
- Argumentspublic FormattedText(String ptn, Locale locale, Object... arguments)
ptn
- Patternlocale
- Format localearguments
- Argumentspublic FormattedText(Text ptn, Locale locale, Object... arguments)
ptn
- Patternlocale
- Format localearguments
- Argumentspublic FormattedText(String ptn, Collection<Object> arguments)
ptn
- Patternarguments
- Argumentspublic FormattedText(Text ptn, Collection<Object> arguments)
ptn
- Patternarguments
- Argumentspublic FormattedText(String ptn, Locale locale, Collection<Object> arguments)
ptn
- Patternlocale
- Format localearguments
- Argumentspublic FormattedText(Text ptn, Locale locale, Collection<Object> arguments)
ptn
- Patternlocale
- Format localearguments
- Argumentspublic String asString() throws IOException
Text
asString
in interface Text
IOException
- If failspublic int compareTo(Text text)
compareTo
in interface Comparable<Text>
Copyright © 2017 Cactoos. All rights reserved.