Package dev.pfaff.discordrpc.message
Record Class Frame<A,D>
java.lang.Object
java.lang.Record
dev.pfaff.discordrpc.message.Frame<A,D>
- All Implemented Interfaces:
Message
public record Frame<A,D> (Frame.Command command, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt, @Nullable UUID nonce)
extends Record
implements Message
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface dev.pfaff.discordrpc.message.Message
Message.Opcode, Message.Unknown -
Constructor Summary
ConstructorsConstructorDescriptionFrame(Frame.Command command, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt) Frame(Frame.Command command, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt, @Nullable UUID nonce) Creates an instance of aFramerecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Aargs()Returns the value of theargsrecord component.command()Returns the value of thecommandrecord component.@Nullable Ddata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable Frame.Eventevt()Returns the value of theevtrecord component.final inthashCode()Returns a hash code value for this object.@Nullable UUIDnonce()Returns the value of thenoncerecord component.intopcode()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Frame
-
Frame
public Frame(Frame.Command command, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt, @Nullable UUID nonce) Creates an instance of aFramerecord class.- Parameters:
command- the value for thecommandrecord componentargs- the value for theargsrecord componentdata- the value for thedatarecord componentevt- the value for theevtrecord componentnonce- the value for thenoncerecord component
-
-
Method Details
-
opcode
public int opcode() -
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). -
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
args
Returns the value of theargsrecord component.- Returns:
- the value of the
argsrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
evt
Returns the value of theevtrecord component.- Returns:
- the value of the
evtrecord component
-
nonce
Returns the value of thenoncerecord component.- Returns:
- the value of the
noncerecord component
-