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>(@Nullable Frame.Command cmd, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt, @Nullable UUID nonce) extends Record implements Message
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
    static enum 
     

    Nested classes/interfaces inherited from interface dev.pfaff.discordrpc.message.Message

    Message.Opcode, Message.Unknown
  • Constructor Summary

    Constructors
    Constructor
    Description
    Frame(@Nullable Frame.Command cmd, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt)
     
    Frame(@Nullable Frame.Command cmd, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt, @Nullable UUID nonce)
    Creates an instance of a Frame record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable A
    Returns the value of the args record component.
    @Nullable Frame.Command
    cmd()
    Returns the value of the cmd record component.
    @Nullable D
    Returns the value of the data record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @Nullable Frame.Event
    evt()
    Returns the value of the evt record component.
    final int
    Returns a hash code value for this object.
    @Nullable UUID
    Returns the value of the nonce record component.
    int
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Frame

      public Frame(@Nullable Frame.Command cmd, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt)
    • Frame

      public Frame(@Nullable Frame.Command cmd, @Nullable A args, @Nullable D data, @Nullable Frame.Event evt, @Nullable UUID nonce)
      Creates an instance of a Frame record class.
      Parameters:
      cmd - the value for the cmd record component
      args - the value for the args record component
      data - the value for the data record component
      evt - the value for the evt record component
      nonce - the value for the nonce record component
  • Method Details

    • opcode

      public int opcode()
      Specified by:
      opcode in interface Message
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • cmd

      public @Nullable Frame.Command cmd()
      Returns the value of the cmd record component.
      Returns:
      the value of the cmd record component
    • args

      public @Nullable A args()
      Returns the value of the args record component.
      Returns:
      the value of the args record component
    • data

      public @Nullable D data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • evt

      public @Nullable Frame.Event evt()
      Returns the value of the evt record component.
      Returns:
      the value of the evt record component
    • nonce

      public @Nullable UUID nonce()
      Returns the value of the nonce record component.
      Returns:
      the value of the nonce record component