Class ShortMessage


  • public class ShortMessage
    extends java.lang.Object
    Short message struct.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Date date
      The publication date.
      protected User sender
      The sender.
      protected java.lang.String text
      The text.
    • Constructor Summary

      Constructors 
      Constructor Description
      ShortMessage()
      Create a new ShortMessage.
      ShortMessage​(java.lang.String text, User sender)
      Create a new ShortMessage.
      ShortMessage​(java.lang.String text, User sender, java.util.Date date)
      Create a new ShortMessage.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date getDate()
      Get the date.
      User getSender()
      Get the sender.
      java.lang.String getText()
      Get the text.
      void setDate​(java.util.Date date)
      Set the date.
      void setSender​(User sender)
      Set the sender.
      void setText​(java.lang.String text)
      Set the text.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • text

        protected java.lang.String text
        The text.
      • sender

        protected User sender
        The sender.
      • date

        protected java.util.Date date
        The publication date.
    • Constructor Detail

      • ShortMessage

        public ShortMessage()
        Create a new ShortMessage.
      • ShortMessage

        public ShortMessage​(java.lang.String text,
                            User sender)
        Create a new ShortMessage.
      • ShortMessage

        public ShortMessage​(java.lang.String text,
                            User sender,
                            java.util.Date date)
        Create a new ShortMessage.
    • Method Detail

      • getText

        public java.lang.String getText()
        Get the text.
        Returns:
        the text
      • setText

        public void setText​(java.lang.String text)
        Set the text.
        Parameters:
        text - The text to set
      • getSender

        public User getSender()
        Get the sender.
        Returns:
        the sender
      • setSender

        public void setSender​(User sender)
        Set the sender.
        Parameters:
        sender - The sender to set
      • getDate

        public java.util.Date getDate()
        Get the date.
        Returns:
        the date
      • setDate

        public void setDate​(java.util.Date date)
        Set the date.
        Parameters:
        date - The date to set