public class HistoryList extends ArrayList<ChatMessage> implements ChatDisplay
| Modifier and Type | Class and Description |
|---|---|
static interface |
HistoryList.Observer
An interface for chat history observers.
|
| Constructor and Description |
|---|
HistoryList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(HistoryList.Observer obs)
Adds an
HistoryList.Observer that wants to know about changes to the history. |
void |
clear()
Called to clear the chat display.
|
boolean |
displayMessage(ChatMessage msg,
boolean alreadyDisplayed)
Called to display a chat message.
|
void |
removeObserver(HistoryList.Observer obs)
Removes a
HistoryList.Observer from hearing about changes to the history. |
add, add, addAll, addAll, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringcontainsAll, equals, hashCodeparallelStream, streampublic boolean displayMessage(ChatMessage msg, boolean alreadyDisplayed)
ChatDisplaydisplayMessage in interface ChatDisplayalreadyDisplayed - true if a previous chat display in the list has
already displayed this message, false otherwise.public void clear()
ChatDisplayclear in interface ChatDisplayclear in interface Collection<ChatMessage>clear in interface List<ChatMessage>clear in class ArrayList<ChatMessage>public void addObserver(HistoryList.Observer obs)
HistoryList.Observer that wants to know about changes to the history.public void removeObserver(HistoryList.Observer obs)
HistoryList.Observer from hearing about changes to the history.Copyright © 2015. All rights reserved.