T - The parameter has only a descriptive meaning with no functionality.public final class MessageArg<T> extends Object implements Serializable, CharSequence
MessageService,
Serialized Form| Constructor and Description |
|---|
MessageArg(String name)
Name constructor
|
MessageArg(String name,
String format)
Common constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getCode()
A code name for a template
|
String |
getFormat()
Get optional format of the argument
|
String |
getName()
Get Name of argument
|
<T> T |
getValue(Map<String,Object> map)
Get a value from a map
|
char |
charAt(int index) |
int |
length() |
String |
name()
An alias for method
#getName() |
static <T> MessageArg<T> |
of(String name) |
static <T> MessageArg<T> |
of(String name,
String format) |
CharSequence |
subSequence(int start,
int end) |
protected String |
toCode()
Convert attributes to a code
|
String |
toString()
Returns a code name
|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcodePoints, charspublic MessageArg(@Nonnull String name, @Nullable String format)
name - Argument nameformat - Format syntax is described on
java.util.Formatterpublic final String toString()
toString in interface CharSequencetoString in class Objectpublic final int length()
length in interface CharSequencepublic final char charAt(int index)
charAt in interface CharSequencepublic final CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic static <T> MessageArg<T> of(@Nonnull String name)
public static <T> MessageArg<T> of(@Nonnull String name, @Nullable String format)
Copyright 2019-2022, Pavel Ponec