Record Class AnvilUpdateEventTests.Context
java.lang.Object
java.lang.Record
net.neoforged.neoforge.debug.crafting.AnvilUpdateEventTests.Context
- Enclosing class:
AnvilUpdateEventTests
private static record AnvilUpdateEventTests.Context(ExtendedGameTestHelper helper, Player player, AnvilMenu menu)
extends Record
Holds the pieces every test needs after setup.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Context
(ExtendedGameTestHelper helper, Player player, AnvilMenu menu) Creates an instance of aContext
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.helper()
Returns the value of thehelper
record component.menu()
Returns the value of themenu
record component.player()
Returns the value of theplayer
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
helper
The field for thehelper
record component. -
player
The field for theplayer
record component.
-
-
Constructor Details
-
Context
Creates an instance of aContext
record class.- Parameters:
helper
- the value for thehelper
record componentplayer
- the value for theplayer
record componentmenu
- the value for themenu
record 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
helper
Returns the value of thehelper
record component.- Returns:
- the value of the
helper
record component
-
player
Returns the value of theplayer
record component.- Returns:
- the value of the
player
record component
-