Record Class MachineError.WrongThread
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.error.MachineError.WrongThread
- All Implemented Interfaces:
MachineError
- Enclosing interface:
MachineError
public static record MachineError.WrongThread(@NotNull String operation, @NotNull String thread)
extends Record
implements MachineError
Called from a thread that does not own the target (ยง16).
-
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
ConstructorsConstructorDescriptionWrongThread(@NotNull String operation, @NotNull String thread) Creates an instance of aWrongThreadrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.key.Keycode()Stable machine-readable code, e.g.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringmessage()@NotNull StringReturns the value of theoperationrecord component.@NotNull Stringthread()Returns the value of thethreadrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface MachineError
context, format
-
Field Details
-
CODE
public static final net.kyori.adventure.key.Key CODE
-
-
Constructor Details
-
WrongThread
-
-
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
-
message
- Specified by:
messagein 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). -
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
thread
Returns the value of thethreadrecord component.- Returns:
- the value of the
threadrecord component
-