public final class Conversation
extends java.lang.Object
Conversation
- Encapsulates a list of messages.Constructor and Description |
---|
Conversation()
Initializes a new
Conversation . |
Conversation(java.util.Collection<MailMessage> messages)
Initializes a new
Conversation . |
Conversation(Conversation copy)
Initializes a new
Conversation . |
Conversation(MailMessage message)
Initializes a new
Conversation . |
Modifier and Type | Method and Description |
---|---|
Conversation |
addMessage(MailMessage message)
Adds given message to this conversation
|
java.util.List<MailMessage> |
getMessages()
Gets the messages.
|
java.util.List<MailMessage> |
getMessages(java.util.Comparator<MailMessage> comparator)
Gets the messages.
|
boolean |
isReferencedBy(Conversation other)
Checks if this conversation is referenced by given conversation
|
Conversation |
join(Conversation other)
Joins this conversation with other conversation.
|
boolean |
references(Conversation other)
Checks if this conversation references to given conversation
|
boolean |
referencesOrIsReferencedBy(Conversation other)
Checks if this conversation references OR is referenced by given conversation
|
boolean |
referencesOrIsReferencedBy(MailMessage message)
Checks if this conversation references OR is referenced by given message
|
public Conversation()
Conversation
.public Conversation(Conversation copy)
Conversation
.public Conversation(MailMessage message)
Conversation
.public Conversation(java.util.Collection<MailMessage> messages)
Conversation
.public Conversation addMessage(MailMessage message)
message
- The message to addpublic Conversation join(Conversation other)
other
- The other conversation to join withpublic boolean referencesOrIsReferencedBy(MailMessage message)
message
- The messagetrue
if references or referenced-by; otherwise false
public boolean referencesOrIsReferencedBy(Conversation other)
other
- The other conversationtrue
if references or referenced-by; otherwise false
public boolean references(Conversation other)
other
- The other conversation possibly referencedtrue
if references; otherwise false
public boolean isReferencedBy(Conversation other)
other
- The other conversationtrue
if referenced-by; otherwise false
public java.util.List<MailMessage> getMessages()
public java.util.List<MailMessage> getMessages(java.util.Comparator<MailMessage> comparator)
comparator
- The comparator used for sorting listed messages