Package com.mcawful.social
Record Class SocialPollType
java.lang.Object
java.lang.Record
com.mcawful.social.SocialPollType
- Record Components:
id- the id, such asmentionsminDelaySeconds- the shortest allowed delay between two polls, in secondsdefaultDelaySeconds- the default delay between two polls, in secondsfeedsRewards- iftrue, the authors of new items are sent for repost rewards
public record SocialPollType(String id, int minDelaySeconds, int defaultDelaySeconds, boolean feedsRewards)
extends Record
A kind of activity a
SocialPlatform can be polled for
The settings poll_<id> and polldelay_<id> in the platform's table turn the poll on and set its delay
- Author:
- mcawful
-
Constructor Summary
ConstructorsConstructorDescriptionSocialPollType(String id, int minDelaySeconds, int defaultDelaySeconds, boolean feedsRewards) Creates an instance of aSocialPollTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedefaultDelaySecondsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefeedsRewardsrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intReturns the value of theminDelaySecondsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SocialPollType
public SocialPollType(String id, int minDelaySeconds, int defaultDelaySeconds, boolean feedsRewards) Creates an instance of aSocialPollTyperecord class.- Parameters:
id- the value for theidrecord componentminDelaySeconds- the value for theminDelaySecondsrecord componentdefaultDelaySeconds- the value for thedefaultDelaySecondsrecord componentfeedsRewards- the value for thefeedsRewardsrecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
minDelaySeconds
public int minDelaySeconds()Returns the value of theminDelaySecondsrecord component.- Returns:
- the value of the
minDelaySecondsrecord component
-
defaultDelaySeconds
public int defaultDelaySeconds()Returns the value of thedefaultDelaySecondsrecord component.- Returns:
- the value of the
defaultDelaySecondsrecord component
-
feedsRewards
public boolean feedsRewards()Returns the value of thefeedsRewardsrecord component.- Returns:
- the value of the
feedsRewardsrecord component
-