Record Class Checklist
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Checklist
- All Implemented Interfaces:
Serializable,ApiResult
public record Checklist(String title, @Nullable MessageEntity[] titleEntities, ChecklistTask[] tasks, boolean othersCanAddTasks, boolean othersCanMarkTasksAsDone)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChecklist(String title, @Nullable MessageEntity[] titleEntities, ChecklistTask[] tasks, boolean othersCanAddTasks, boolean othersCanMarkTasksAsDone) Creates an instance of aChecklistrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theothersCanAddTasksrecord component.booleanReturns the value of theothersCanMarkTasksAsDonerecord component.tasks()Returns the value of thetasksrecord component.title()Returns the value of thetitlerecord component.@Nullable MessageEntity[]Returns the value of thetitleEntitiesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Checklist
public Checklist(String title, @Nullable @Nullable MessageEntity[] titleEntities, ChecklistTask[] tasks, boolean othersCanAddTasks, boolean othersCanMarkTasksAsDone) Creates an instance of aChecklistrecord class.- Parameters:
title- the value for thetitlerecord componenttitleEntities- the value for thetitleEntitiesrecord componenttasks- the value for thetasksrecord componentothersCanAddTasks- the value for theothersCanAddTasksrecord componentothersCanMarkTasksAsDone- the value for theothersCanMarkTasksAsDonerecord 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 '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
titleEntities
Returns the value of thetitleEntitiesrecord component.- Returns:
- the value of the
titleEntitiesrecord component
-
tasks
Returns the value of thetasksrecord component.- Returns:
- the value of the
tasksrecord component
-
othersCanAddTasks
public boolean othersCanAddTasks()Returns the value of theothersCanAddTasksrecord component.- Returns:
- the value of the
othersCanAddTasksrecord component
-
othersCanMarkTasksAsDone
public boolean othersCanMarkTasksAsDone()Returns the value of theothersCanMarkTasksAsDonerecord component.- Returns:
- the value of the
othersCanMarkTasksAsDonerecord component
-