Record Class MachineError.InvalidDefinition
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.error.MachineError.InvalidDefinition
- All Implemented Interfaces:
MachineError
- Enclosing interface:
MachineError
public static record MachineError.InvalidDefinition(@NotNull net.kyori.adventure.key.Key subject, @NotNull String message)
extends Record
implements MachineError
A definition (type, recipe, port …) is invalid.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MachineError
MachineError.Generic, MachineError.InsufficientResource, MachineError.InvalidConfiguration, MachineError.InvalidDefinition, MachineError.MissingResource, MachineError.SerializationError, MachineError.TransferRejected, MachineError.WrongThread -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInvalidDefinition(@NotNull net.kyori.adventure.key.Key subject, @NotNull String message) Creates an instance of aInvalidDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.key.Keycode()Stable machine-readable code, e.g.context()Debugging details.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringmessage()Returns the value of themessagerecord component.@NotNull net.kyori.adventure.key.Keysubject()Returns the value of thesubjectrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface MachineError
format
-
Field Details
-
CODE
public static final net.kyori.adventure.key.Key CODE
-
-
Constructor Details
-
InvalidDefinition
public InvalidDefinition(@NotNull @NotNull net.kyori.adventure.key.Key subject, @NotNull @NotNull String message) Creates an instance of aInvalidDefinitionrecord class.- Parameters:
subject- the value for thesubjectrecord componentmessage- the value for themessagerecord component
-
-
Method Details
-
code
@NotNull public @NotNull net.kyori.adventure.key.Key code()Description copied from interface:MachineErrorStable machine-readable code, e.g.machineengine:insufficient_resource.- Specified by:
codein interfaceMachineError
-
context
Description copied from interface:MachineErrorDebugging details.- Specified by:
contextin interfaceMachineError
-
toString
-
hashCode
-
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). -
subject
@NotNull public @NotNull net.kyori.adventure.key.Key subject()Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceMachineError- Returns:
- the value of the
messagerecord component
-