Package kr.toxicity.command.impl
Record Class CommandPrefix
java.lang.Object
java.lang.Record
kr.toxicity.command.impl.CommandPrefix
- Record Components:
info- info messagewarn- warn messageerror- error message
public record CommandPrefix(@NotNull CommandMessage info, @NotNull CommandMessage warn, @NotNull CommandMessage error)
extends Record
Command prefix
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommandPrefix(@NotNull CommandMessage info, @NotNull CommandMessage warn, @NotNull CommandMessage error) Initializes command prefix -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull CommandMessageerror()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.@NotNull CommandMessageinfo()Returns the value of theinforecord component.final StringtoString()Returns a string representation of this record class.@NotNull CommandMessagewarn()Returns the value of thewarnrecord component.
-
Field Details
-
DEFAULT
Default command prefix
-
-
Constructor Details
-
CommandPrefix
public CommandPrefix(@NotNull @NotNull CommandMessage info, @NotNull @NotNull CommandMessage warn, @NotNull @NotNull CommandMessage error) Initializes command prefix- Parameters:
info- info messagewarn- warn messageerror- error message
-
-
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). -
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
warn
Returns the value of thewarnrecord component.- Returns:
- the value of the
warnrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-