|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrpg.core.ChatMessage
public class ChatMessage
ChatMessage represents a single message sent through the chat system. It supports styled text via ChatMarkup. Internally, a message is represented as a List of objects, either ChatMarkup instances or String instances. ChatMarkup objects indicate markup that is applied to all subsequent strings, until the next ChatMarkup object is encountered.
Constructor Summary | |
---|---|
ChatMessage()
Creates a new ChatMessage with a single string as the message. |
|
ChatMessage(java.lang.String s)
Creates a new ChatMessage with a single string as the message. |
Method Summary | |
---|---|
void |
addToMessage(ChatMarkup token)
Appends an element to this message. |
void |
addToMessage(ChatMessage m)
Appends the contents of another message to this one, including all markup. |
void |
addToMessage(java.lang.String token)
Appends an element to this message. |
java.util.List |
getMessage()
Returns a List holding the message components. |
java.lang.String |
getMessageAsString()
Returns a simple String equivalent of this message. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChatMessage()
public ChatMessage(java.lang.String s)
s
- the string to use as the messageMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List getMessage()
public java.lang.String getMessageAsString()
public void addToMessage(java.lang.String token)
token
- a string to use as message textpublic void addToMessage(ChatMarkup token)
token
- a ChatMarkup instance to usepublic void addToMessage(ChatMessage m)
m
- the message to append to this one
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |