Package dev.latvian.mods.kubejs.recipe
Record Class RecipeScriptContext.Impl
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.recipe.RecipeScriptContext.Impl
- All Implemented Interfaces:
RecipeValidationContext,RecipeMatchContext,KubeRecipeContext,RecipeLikeContext,RecipeScriptContext,WithScriptContext
- Enclosing interface:
RecipeScriptContext
public static record RecipeScriptContext.Impl(dev.latvian.mods.rhino.Context cx, KubeRecipe recipe, ErrorStack errors)
extends Record
implements RecipeScriptContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.latvian.mods.kubejs.recipe.RecipeScriptContext
RecipeScriptContext.Impl -
Constructor Summary
ConstructorsConstructorDescriptionImpl(dev.latvian.mods.rhino.Context cx, KubeRecipe recipe) Impl(dev.latvian.mods.rhino.Context cx, KubeRecipe recipe, ErrorStack errors) Creates an instance of aImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondev.latvian.mods.rhino.Contextcx()Returns the value of thecxrecord component.final booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.recipe()Returns the value of thereciperecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.recipe.KubeRecipeContext
ops, registries
-
Constructor Details
-
Impl
-
Impl
Creates an instance of aImplrecord class.- Parameters:
cx- the value for thecxrecord componentrecipe- the value for thereciperecord componenterrors- the value for theerrorsrecord 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). -
cx
public dev.latvian.mods.rhino.Context cx()Returns the value of thecxrecord component.- Specified by:
cxin interfaceWithScriptContext- Returns:
- the value of the
cxrecord component
-
recipe
Returns the value of thereciperecord component.- Specified by:
recipein interfaceKubeRecipeContext- Specified by:
recipein interfaceRecipeLikeContext- Returns:
- the value of the
reciperecord component
-
errors
Returns the value of theerrorsrecord component.- Specified by:
errorsin interfaceRecipeValidationContext- Returns:
- the value of the
errorsrecord component
-