com.techventus.server.voice.datatypes.records
Class SMSThread

java.lang.Object
  extended by com.techventus.server.voice.datatypes.records.Record
      extended by com.techventus.server.voice.datatypes.records.SMSThread

public class SMSThread
extends Record

Represents a thread of SMS messages.

Author:
Tiago Proenca (tproenca)

Constructor Summary
SMSThread(java.lang.String id, java.lang.String note, java.util.Date date, Contact contact, boolean read, boolean starred)
          Creates a SMSThread instance.
 
Method Summary
 void addSMS(SMS sms)
          Adds a SMS object to this thread.
 java.util.Collection<SMS> getAllSMS()
          Returns all SMS that exist in this thread.
 java.lang.String getNote()
          Returns the thread's note.
 boolean isStarred()
          Returns whether this thread is starred.
 void removeSMS(SMS sms)
          Removes a SMS object from this thread.
 java.lang.String toString()
          Returns a String representation
 
Methods inherited from class com.techventus.server.voice.datatypes.records.Record
getContact, getDate, getId, getRead, getTitle, isCall, isShortMessage, isVoicemail, setContact, setDate, setId, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SMSThread

public SMSThread(java.lang.String id,
                 java.lang.String note,
                 java.util.Date date,
                 Contact contact,
                 boolean read,
                 boolean starred)
Creates a SMSThread instance.

Parameters:
id - the thread's ID
note - the thread's note
date - the thread's timestamp
contact - the thread's contact
read - whether the thread is starred
starred - whether the thread is read.
Method Detail

addSMS

public void addSMS(SMS sms)
Adds a SMS object to this thread.

Parameters:
sms - a SMS object.

removeSMS

public void removeSMS(SMS sms)
Removes a SMS object from this thread.

Parameters:
sms - a SMS object.

getAllSMS

public java.util.Collection<SMS> getAllSMS()
Returns all SMS that exist in this thread.

Returns:
all SMS objects.

getNote

public java.lang.String getNote()
Returns the thread's note.

Returns:
the thread's note.

isStarred

public boolean isStarred()
Returns whether this thread is starred.

Returns:
whether this thread is starred

toString

public java.lang.String toString()
Description copied from class: Record
Returns a String representation

Specified by:
toString in class Record