Record Class SpritesheetSpec
java.lang.Object
java.lang.Record
com.csse3200.game.components.computerterminal.SpritesheetSpec
- All Implemented Interfaces:
CaptchaSpecLike
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.csse3200.game.components.computerterminal.CaptchaSpecLike
CaptchaSpecLike.ImageSource -
Constructor Summary
ConstructorsConstructorDescriptionSpritesheetSpec(String texturePath, int rows, int cols, Set<Integer> correct, String prompt) Creates an instance of aSpritesheetSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcols()Returns the value of thecolsrecord component.correct()Returns the value of thecorrectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.prompt()Returns the value of thepromptrecord component.introws()Returns the value of therowsrecord component.source()Returns the value of thetexturePathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SpritesheetSpec
Creates an instance of aSpritesheetSpecrecord class.- Parameters:
texturePath- the value for thetexturePathrecord componentrows- the value for therowsrecord componentcols- the value for thecolsrecord componentcorrect- the value for thecorrectrecord componentprompt- the value for thepromptrecord component
-
-
Method Details
-
source
- Specified by:
sourcein interfaceCaptchaSpecLike
-
prompt
Returns the value of thepromptrecord component.- Specified by:
promptin interfaceCaptchaSpecLike- Returns:
- the value of the
promptrecord component
-
rows
public int rows()Returns the value of therowsrecord component.- Specified by:
rowsin interfaceCaptchaSpecLike- Returns:
- the value of the
rowsrecord component
-
cols
public int cols()Returns the value of thecolsrecord component.- Specified by:
colsin interfaceCaptchaSpecLike- Returns:
- the value of the
colsrecord component
-
correct
Returns the value of thecorrectrecord component.- Specified by:
correctin interfaceCaptchaSpecLike- Returns:
- the value of the
correctrecord component
-
texturePath
Returns the value of thetexturePathrecord component.- Returns:
- the value of the
texturePathrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
-