Class CollaborationMessage

  • All Implemented Interfaces:
    java.io.Serializable

    public class CollaborationMessage
    extends java.lang.Object
    implements java.io.Serializable
    Since:
    3.1
    Author:
    Vaadin Ltd
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CollaborationMessage()
      Creates a new message.
      CollaborationMessage​(UserInfo user, java.lang.String text, java.time.Instant time)
      Creates a new message with the specified user as the message author info, text as the message content and time as the message timestamp.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getText()
      Gets the message content.
      java.time.Instant getTime()
      Gets the message timestamp.
      UserInfo getUser()
      Gets the message author user-info.
      int hashCode()  
      void setText​(java.lang.String text)
      Sets the message content.
      void setTime​(java.time.Instant time)
      Sets the message timestamp.
      void setUser​(UserInfo user)
      Sets the message author user-info.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CollaborationMessage

        public CollaborationMessage()
        Creates a new message.
      • CollaborationMessage

        public CollaborationMessage​(UserInfo user,
                                    java.lang.String text,
                                    java.time.Instant time)
        Creates a new message with the specified user as the message author info, text as the message content and time as the message timestamp.
        Parameters:
        user - the user-info of the message author
        text - the content of the message
        time - the timestamp of the message
    • Method Detail

      • getUser

        public UserInfo getUser()
        Gets the message author user-info.
        Returns:
        the user-info
      • setUser

        public void setUser​(UserInfo user)
        Sets the message author user-info.
        Parameters:
        user - the user-info
      • getText

        public java.lang.String getText()
        Gets the message content.
        Returns:
        the message content
      • setText

        public void setText​(java.lang.String text)
        Sets the message content.
        Parameters:
        text - the message content
      • getTime

        public java.time.Instant getTime()
        Gets the message timestamp.
        Returns:
        the message timestamp
      • setTime

        public void setTime​(java.time.Instant time)
        Sets the message timestamp.
        Parameters:
        time - the message timestamp
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object