java.lang.Object
java.lang.Record
nl.andrewl.concord_core.msg.types.channel.MoveToChannel
- Record Components:
id
- The id of the channel that the client is requesting or being moved to, or the id of another client that the user wishes to begin private messaging with.channelName
- The name of the channel that the client is moved to. This is null in cases where the client is requesting to move to a channel, and is only provided by the server when it moves a client.
- All Implemented Interfaces:
Message
A message that's sent to a client when they've been moved to another channel.
This indicates to the client that they should perform the necessary requests
to update their view to indicate that they're now in a different channel.
Conversely, a client can send this request to the server to indicate that they would like to switch to the specified channel.
Clients can also send this message and provide the id of another client to request that they enter a private message channel with the referenced client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The field for thechannelName
record component.private final UUID
The field for theid
record component. -
Constructor Summary
ConstructorsConstructorDescriptionMoveToChannel
(UUID id) MoveToChannel
(UUID id, String channelName) Creates an instance of aMoveToChannel
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechannelName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.andrewl.concord_core.msg.Message
byteSize, getTypeSerializer
-
Field Details
-
id
The field for theid
record component. -
channelName
The field for thechannelName
record component.
-
-
Constructor Details
-
MoveToChannel
-
MoveToChannel
Creates an instance of aMoveToChannel
record class.- Parameters:
id
- the value for theid
record componentchannelName
- the value for thechannelName
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
channelName
Returns the value of thechannelName
record component.- Returns:
- the value of the
channelName
record component
-