Record Class InvalidDestination
java.lang.Object
java.lang.Record
com.winterhavenmc.lodestar.models.destination.InvalidDestination
- Record Components:
displayName-
- All Implemented Interfaces:
com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.displayname.DisplayNameable,Destination
public record InvalidDestination(String displayName, String reason)
extends Record
implements Destination
Record class that represents an invalid destination
-
Field Summary
Fields inherited from interface com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.displayname.DisplayNameable
VALID_DISPLAY_NAME -
Constructor Summary
ConstructorsConstructorDescriptionInvalidDestination(String displayName, String reason) Creates an instance of aInvalidDestinationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.@NotNull 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 com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.displayname.DisplayNameable
extractDisplayName
-
Constructor Details
-
InvalidDestination
Creates an instance of aInvalidDestinationrecord class.- Parameters:
displayName- the value for thedisplayNamerecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein interfaceDestination- Specified by:
getDisplayNamein interfacecom.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.displayname.DisplayNameable
-
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). -
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-