app / sg.edu.ntu.scse.cz2006.gymbuddies.datastruct / ChatMessage

ChatMessage

open class ChatMessage

Created by Chia Yu on 22/10/2019. for sg.edu.ntu.scse.cz2006.gymbuddies.datastruct in Gym Buddies! Entity class to hold single chat message between user.

Author
Chia Yu

Since
2019-10-22

Constructors

<init>

default constructor

ChatMessage()

alternate constructor

ChatMessage(message: String!, sender: String!, timestamp: Long)
ChatMessage(message: String!, sender: String!)

Properties

message

the message content. It is nullable to denote that message is being deleted

var message: String!

sender

user id of user that send out the message

var sender: String!

timestamp

timestamp of message of user send out the message

var timestamp: Long

Functions

getMessage

getter method of #message

open fun getMessage(): String!

getSender

getter method of #sender

open fun getSender(): String!

getTimestamp

getter method of #timestamp

open fun getTimestamp(): Long

setMessage

setter method of #message

open fun setMessage(message: String!): Unit

setSender

setter method of #sender

open fun setSender(sender: String!): Unit

setTimestamp

setter method of #timestamp

open fun setTimestamp(timestamp: Long): Unit