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

java.lang.Object
  extended by com.techventus.server.voice.datatypes.records.SMS
All Implemented Interfaces:
java.lang.Comparable<SMS>

public class SMS
extends java.lang.Object
implements java.lang.Comparable<SMS>

Represents a SMS message.

Author:
Tiago Proenca (tproenca)

Constructor Summary
SMS(Contact from, java.lang.String content, java.util.Date dateTime)
          Creates a SMS instance.
 
Method Summary
 int compareTo(SMS o)
           
 java.lang.String getContent()
          Returns the message's content.
 java.util.Date getDateTime()
          Returns the message's timestamp.
 Contact getFrom()
          Returns the contact that sent the message.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SMS

public SMS(Contact from,
           java.lang.String content,
           java.util.Date dateTime)
Creates a SMS instance.

Parameters:
from - the contact that sent the message
the - message's content
dateTime - the message's timestamp
Method Detail

getFrom

public Contact getFrom()
Returns the contact that sent the message.

Returns:
the contact that sent the message

getContent

public java.lang.String getContent()
Returns the message's content.

Returns:
the message's content

getDateTime

public java.util.Date getDateTime()
Returns the message's timestamp.

Returns:
the message's timestamp

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(SMS o)
Specified by:
compareTo in interface java.lang.Comparable<SMS>