Package dev.pfaff.discordrpc
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 Summary
ConstructorsConstructorDescriptionActivity(String state, String details, boolean instance, ActivityTimestamps timestamps, ActivityAssets assets, ActivityParty party, ActivitySecrets secrets) Creates an instance of aActivityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionassets()Returns the value of theassetsrecord component.details()Returns the value of thedetailsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleaninstance()Returns the value of theinstancerecord component.party()Returns the value of thepartyrecord component.secrets()Returns the value of thesecretsrecord component.state()Returns the value of thestaterecord component.Returns the value of thetimestampsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Activity
public Activity(String state, String details, boolean instance, ActivityTimestamps timestamps, ActivityAssets assets, ActivityParty party, ActivitySecrets secrets) Creates an instance of aActivityrecord class.- Parameters:
state- the value for thestaterecord componentdetails- the value for thedetailsrecord componentinstance- the value for theinstancerecord componenttimestamps- the value for thetimestampsrecord componentassets- the value for theassetsrecord componentparty- the value for thepartyrecord componentsecrets- the value for thesecretsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
details
Returns the value of thedetailsrecord component.- Returns:
- the value of the
detailsrecord component
-
instance
public boolean instance()Returns the value of theinstancerecord component.- Returns:
- the value of the
instancerecord component
-
timestamps
Returns the value of thetimestampsrecord component.- Returns:
- the value of the
timestampsrecord component
-
assets
Returns the value of theassetsrecord component.- Returns:
- the value of the
assetsrecord component
-
party
Returns the value of thepartyrecord component.- Returns:
- the value of the
partyrecord component
-
secrets
Returns the value of thesecretsrecord component.- Returns:
- the value of the
secretsrecord component
-