Package vaultWeb.dtos.dashboard
Record Class UserDashboardDto.PollSummary
java.lang.Object
java.lang.Record
vaultWeb.dtos.dashboard.UserDashboardDto.PollSummary
- Enclosing class:
UserDashboardDto
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theanonymousrecord component.deadline()Returns the value of thedeadlinerecord component.final booleanIndicates whether some other object is "equal to" this one.groupId()Returns the value of thegroupIdrecord component.Returns the value of thegroupNamerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intReturns the value of theoptionCountrecord component.question()Returns the value of thequestionrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalVotesrecord component.
-
Constructor Details
-
PollSummary
public PollSummary(Long id, String question, Long groupId, String groupName, boolean anonymous, Instant deadline, int optionCount, int totalVotes) Creates an instance of aPollSummaryrecord class.- Parameters:
id- the value for theidrecord componentquestion- the value for thequestionrecord componentgroupId- the value for thegroupIdrecord componentgroupName- the value for thegroupNamerecord componentanonymous- the value for theanonymousrecord componentdeadline- the value for thedeadlinerecord componentoptionCount- the value for theoptionCountrecord componenttotalVotes- the value for thetotalVotesrecord 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
-
question
Returns the value of thequestionrecord component.- Returns:
- the value of the
questionrecord component
-
groupId
Returns the value of thegroupIdrecord component.- Returns:
- the value of the
groupIdrecord component
-
groupName
Returns the value of thegroupNamerecord component.- Returns:
- the value of the
groupNamerecord component
-
anonymous
public boolean anonymous()Returns the value of theanonymousrecord component.- Returns:
- the value of the
anonymousrecord component
-
deadline
Returns the value of thedeadlinerecord component.- Returns:
- the value of the
deadlinerecord component
-
optionCount
public int optionCount()Returns the value of theoptionCountrecord component.- Returns:
- the value of the
optionCountrecord component
-
totalVotes
public int totalVotes()Returns the value of thetotalVotesrecord component.- Returns:
- the value of the
totalVotesrecord component
-