Record Class PollOption
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.PollOption
- All Implemented Interfaces:
Serializable, ApiResult
-
Constructor Summary
ConstructorsConstructorDescriptionPollOption(String persistentId, String text, @Nullable MessageEntity[] textEntities, @Nullable PollMedia media, int voterCount, @Nullable User addedByUser, @Nullable Date additionDate) Creates an instance of aPollOptionrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable UserReturns the value of theaddedByUserrecord component.@Nullable DateReturns the value of theadditionDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable PollMediamedia()Returns the value of themediarecord component.Returns the value of thepersistentIdrecord component.text()Returns the value of thetextrecord component.@Nullable MessageEntity[]Returns the value of thetextEntitiesrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thevoterCountrecord component.
-
Constructor Details
-
PollOption
public PollOption(String persistentId, String text, @Nullable @Nullable MessageEntity[] textEntities, @Nullable @Nullable PollMedia media, int voterCount, @Nullable @Nullable User addedByUser, @Nullable @Nullable Date additionDate) Creates an instance of aPollOptionrecord class.- Parameters:
persistentId- the value for thepersistentIdrecord componenttext- the value for thetextrecord componenttextEntities- the value for thetextEntitiesrecord componentmedia- the value for themediarecord componentvoterCount- the value for thevoterCountrecord componentaddedByUser- the value for theaddedByUserrecord componentadditionDate- the value for theadditionDaterecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
persistentId
Returns the value of thepersistentIdrecord component.- Returns:
- the value of the
persistentIdrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
textEntities
Returns the value of thetextEntitiesrecord component.- Returns:
- the value of the
textEntitiesrecord component
-
media
Returns the value of themediarecord component.- Returns:
- the value of the
mediarecord component
-
voterCount
public int voterCount()Returns the value of thevoterCountrecord component.- Returns:
- the value of the
voterCountrecord component
-
addedByUser
Returns the value of theaddedByUserrecord component.- Returns:
- the value of the
addedByUserrecord component
-
additionDate
Returns the value of theadditionDaterecord component.- Returns:
- the value of the
additionDaterecord component
-