|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.hagenah.diplomacy.game.MessageFilter
public class MessageFilter
A filter for messages.
| Constructor Summary | |
|---|---|
MessageFilter(boolean broadcastmessages,
boolean pressmessages,
boolean diarymessages,
java.lang.String text,
java.util.Collection persons)
Creates a message filter |
|
| Method Summary | |
|---|---|
boolean |
areAllMatching()
Do all messages match to this filter? |
boolean |
areBroadcastMessagesIncluded()
Are broadcast messages included? |
boolean |
areDiaryMessagesIncluded()
Are diary messages included? |
boolean |
arePressMessagesIncluded()
Are press messages included? |
boolean |
equals(java.lang.Object obj)
Indicates whether obj is "equal to" this one. |
java.util.SortedSet |
getPersons()
Returns the persons who must know the message. |
java.lang.String |
getText()
Returns the text that must be contained in the message. |
int |
hashCode()
Returns a hashcode for this message filter. |
boolean |
isMatching(DiaryEntry entry)
Tests whether the diary entry matches. |
boolean |
isMatching(Message msg,
MapData map)
Tests whether the msg matches. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageFilter(boolean broadcastmessages,
boolean pressmessages,
boolean diarymessages,
java.lang.String text,
java.util.Collection persons)
broadcastmessages - Are broadcast messages included?pressmessages - Are press messages included?diarymessages - Are diary messages included?text - This text that must be contained in the messagepersons - The persons who must know the message| Method Detail |
|---|
public boolean areBroadcastMessagesIncluded()
public boolean arePressMessagesIncluded()
public boolean areDiaryMessagesIncluded()
public java.lang.String getText()
public java.util.SortedSet getPersons()
public boolean isMatching(Message msg,
MapData map)
msg - The message to testmap - The map of the game
public boolean isMatching(DiaryEntry entry)
entry - The diary entry to test
public boolean areAllMatching()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The other obj
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||