java.lang.Object
java.lang.Record
org.mastodon4j.core.api.entities.Subscription
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccess_tokenrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static Subscriptionhashtag(boolean subscribe, AccessToken accessToken, String tag) Create a hashtag subscription using the following parameters.list()Returns the value of thelistrecord component.stream()Returns the value of thestreamrecord component.static Subscriptionstream(boolean subscribe, AccessToken accessToken, String stream) Create a stream subscription using the following parameters.tag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Subscription
Creates an instance of aSubscriptionrecord class.- Parameters:
access_token- the value for theaccess_tokenrecord componenttype- the value for thetyperecord componentstream- the value for thestreamrecord componentlist- the value for thelistrecord componenttag- the value for thetagrecord component
-
-
Method Details
-
stream
Create a stream subscription using the following parameters.- Parameters:
subscribe-truesubscribe,falseunsubscribeaccessToken- the access tokenstream- the stream name
-
hashtag
Create a hashtag subscription using the following parameters.- Parameters:
subscribe-truesubscribe,falseunsubscribeaccessToken- the access tokentag- the optional hash stream tag
-
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). -
access_token
Returns the value of theaccess_tokenrecord component.- Returns:
- the value of the
access_tokenrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
stream
Returns the value of thestreamrecord component.- Returns:
- the value of the
streamrecord component
-
list
Returns the value of thelistrecord component.- Returns:
- the value of the
listrecord component
-
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-