ChatMessageADT

io.github.positionpal.message.ChatMessageADT

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

trait Message[I, T]

Represents the data that a ChatMessage exposes

Represents the data that a ChatMessage exposes

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def message[I, T](text: String, timestamp: Instant, from: I, to: T): Message[I, T]

Return a new ChatMessage

Return a new ChatMessage

Type parameters

I

The identifier type of the client

T

The identifier type of the group

Value parameters

from

The client that sent the message

text

The content of the message

to

The group that received the message

Attributes

Returns

a ChatMessage instance

def now[I, T](text: String, from: I, to: T): Message[I, T]

Return a new ChatMessage with the timestamp set on the creation time

Return a new ChatMessage with the timestamp set on the creation time

Type parameters

I

The identifier type of the client

T

The identifier type of the group

Value parameters

from

The client that sent the message

text

The content of the message

to

The group that received the message

Attributes

Returns

a ChatMessage instance