Record Class EmptyTemplate.Size
java.lang.Object
java.lang.Record
net.neoforged.testframework.gametest.EmptyTemplate.Size
- Enclosing class:
EmptyTemplate
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSize
(int length, int height, int width) Creates an instance of aSize
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.int
length()
Returns the value of thelength
record component.static EmptyTemplate.Size
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.
-
Field Details
-
length
private final int lengthThe field for thelength
record component. -
height
private final int heightThe field for theheight
record component. -
width
private final int widthThe field for thewidth
record component.
-
-
Constructor Details
-
Size
public Size(int length, int height, int width) Creates an instance of aSize
record class.- Parameters:
length
- the value for thelength
record componentheight
- the value for theheight
record componentwidth
- the value for thewidth
record component
-
-
Method Details
-
parse
-
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 with '=='. -
length
public int length()Returns the value of thelength
record component.- Returns:
- the value of the
length
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-