java.util.FormattableEmote, ListedEmote, Member, Role, SelfUser, TextChannel, UserWidgetUtil.Widget.Memberpublic interface IMentionable
extends java.util.Formattable
Formattable and can be used with a Formatter
such as used by String.format(String, Object...)
or PrintStream.printf(String, Object...).
This will use getAsMention() rather than Object.toString()!
Supported Features:
%20s - uses at minimum 20 chars;
%-10s - uses left-justified padding)%.20s)More information on formatting syntax can be found in the format syntax documentation!
Note: Some implementations also support the alternative flag.
| Modifier and Type | Method | Description |
|---|---|---|
default void |
formatTo(java.util.Formatter formatter,
int flags,
int width,
int precision) |
|
java.lang.String |
getAsMention() |
Retrieve a Mention for this Entity.
|
java.lang.String getAsMention()
Role (@everyone), this will return the literal string "@everyone".default void formatTo(java.util.Formatter formatter,
int flags,
int width,
int precision)
formatTo in interface java.util.Formattable