Record Class ResearchMethod.SimpleMethodContext
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.api.research.methods.ResearchMethod.SimpleMethodContext
- All Implemented Interfaces:
ResearchMethod.MethodContext
- Enclosing interface:
ResearchMethod
public static record ResearchMethod.SimpleMethodContext(ResearchTeam team, @Nullable ResearchLabControllerBE blockEntity)
extends Record
implements ResearchMethod.MethodContext
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleMethodContext(ResearchTeam team, @Nullable ResearchLabControllerBE blockEntity) Creates an instance of aSimpleMethodContextrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ResearchLabControllerBEReturns the value of theblockEntityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.team()Returns the value of theteamrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SimpleMethodContext
public SimpleMethodContext(ResearchTeam team, @Nullable @Nullable ResearchLabControllerBE blockEntity) Creates an instance of aSimpleMethodContextrecord class.- Parameters:
team- the value for theteamrecord componentblockEntity- the value for theblockEntityrecord 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). -
team
Returns the value of theteamrecord component.- Specified by:
teamin interfaceResearchMethod.MethodContext- Returns:
- the value of the
teamrecord component
-
blockEntity
Returns the value of theblockEntityrecord component.- Returns:
- the value of the
blockEntityrecord component
-