Record Class TutorialStep
java.lang.Object
java.lang.Record
com.csse3200.game.components.screens.TutorialStep
- Record Components:
title
- Short heading for the step.description
- Explanatory body text for the step.clip
- Optional animated clip associated with this step; may benull
.
Represents a single page in the Tutorial flow.
A TutorialStep
consists of a title, descriptive text, and an optional
animated clip (see TutorialClip
) to illustrate the concept.
-
Constructor Summary
ConstructorsConstructorDescriptionTutorialStep
(String title, String description, TutorialClip clip) Creates a tutorial step with optional animation. -
Method Summary
Modifier and TypeMethodDescriptionclip()
Returns the value of theclip
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TutorialStep
Creates a tutorial step with optional animation.- Parameters:
title
- step title (non-null, non-empty recommended)description
- step description (non-null, non-empty recommended)clip
- optional animated clip; may benull
if no media is shown
-
-
Method Details
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
clip
Returns the value of theclip
record component.- Returns:
- the value of the
clip
record component
-
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)
.
-