Record Class Activity

java.lang.Object
java.lang.Record
dev.pfaff.discordrpc.Activity

public record Activity(String state, String details, boolean instance, ActivityTimestamps timestamps, ActivityAssets assets, ActivityParty party, ActivitySecrets secrets) extends Record
  • Constructor Details

    • Activity

      public Activity(String state, String details, boolean instance, ActivityTimestamps timestamps, ActivityAssets assets, ActivityParty party, ActivitySecrets secrets)
      Creates an instance of a Activity record class.
      Parameters:
      state - the value for the state record component
      details - the value for the details record component
      instance - the value for the instance record component
      timestamps - the value for the timestamps record component
      assets - the value for the assets record component
      party - the value for the party record component
      secrets - the value for the secrets record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • details

      public String details()
      Returns the value of the details record component.
      Returns:
      the value of the details record component
    • instance

      public boolean instance()
      Returns the value of the instance record component.
      Returns:
      the value of the instance record component
    • timestamps

      public ActivityTimestamps timestamps()
      Returns the value of the timestamps record component.
      Returns:
      the value of the timestamps record component
    • assets

      public ActivityAssets assets()
      Returns the value of the assets record component.
      Returns:
      the value of the assets record component
    • party

      public ActivityParty party()
      Returns the value of the party record component.
      Returns:
      the value of the party record component
    • secrets

      public ActivitySecrets secrets()
      Returns the value of the secrets record component.
      Returns:
      the value of the secrets record component