T - The parameter has only a descriptive meaning with no functionality.public final class MessageArg<T> extends Object implements Serializable, CharSequence
MessageService,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
PARAM_BEG
Two-character mark ("${") to introducing a template argument.
|
static char |
PARAM_END
The mark ("}") to finishing a template argument.
|
| Constructor and Description |
|---|
MessageArg(@NotNull String name)
Name constructor
|
MessageArg(@NotNull String name,
@Nullable String format)
Common constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
@NotNull String |
getCode()
A code name for a template
|
@Nullable String |
getFormat()
Get optional format of the argument
|
@NotNull 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() |
@NotNull String |
name()
An alias for method
#getName() |
static <T> MessageArg<T> |
of(@NotNull String name) |
static <T> MessageArg<T> |
of(@NotNull String name,
@Nullable String format) |
CharSequence |
subSequence(int start,
int end) |
protected @NotNull String |
toCode()
Convert attributes to a code
|
String |
toString()
Returns a code name
|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcodePoints, charspublic static final String PARAM_BEG
public static final char PARAM_END
public MessageArg(@NotNull
@NotNull String name)
public MessageArg(@NotNull
@NotNull String name,
@Nullable
@Nullable String format)
name - Argument nameformat - Format syntax is described on
java.util.Formatter@NotNull public @NotNull String getName()
@NotNull public final @NotNull String name()
#getName()@Nullable public @Nullable String getFormat()
@NotNull public @NotNull String getCode()
@NotNull protected final @NotNull String toCode()
public 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(@NotNull @NotNull String name)
public static <T> MessageArg<T> of(@NotNull @NotNull String name, @Nullable @Nullable String format)
Copyright 2015, Pavel Ponec