Record Class MachineError.Generic
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.error.MachineError.Generic
- All Implemented Interfaces:
MachineError
- Enclosing interface:
MachineError
-
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.key.Keycode()Returns the value of thecoderecord component.context()Returns the value of thecontextrecord component.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.final StringtoString()Returns a string representation of this record class.Methods inherited from interface MachineError
format
-
Constructor Details
-
Generic
public Generic(@NotNull @NotNull net.kyori.adventure.key.Key code, @NotNull @NotNull String message, @NotNull @NotNull Map<String, Object> context) Creates an instance of aGenericrecord class.- Parameters:
code- the value for thecoderecord componentmessage- the value for themessagerecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
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). -
code
@NotNull public @NotNull net.kyori.adventure.key.Key code()Returns the value of thecoderecord component.- Specified by:
codein interfaceMachineError- Returns:
- the value of the
coderecord component
-
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceMachineError- Returns:
- the value of the
messagerecord component
-
context
Returns the value of thecontextrecord component.- Specified by:
contextin interfaceMachineError- Returns:
- the value of the
contextrecord component
-