Record Class Metrics.Tag.CommandId
java.lang.Object
java.lang.Record
dev.sympho.modular_commands.execute.Metrics.Tag.CommandId
- Record Components:
id- The command ID.
- All Implemented Interfaces:
Metrics.Tag
- Enclosing interface:
- Metrics.Tag
The tag that indicates the command ID.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.sympho.modular_commands.execute.Metrics.Tag
Metrics.Tag.CommandId, Metrics.Tag.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static Metrics.Tag.CommandIdCreates a tag with the given id as value.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.key()Retrieves the tag key.final StringtoString()Returns a string representation of this record class.value()Retrieves the tag value.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.sympho.modular_commands.execute.Metrics.Tag
apply, apply
-
Constructor Details
-
CommandId
Creates a new instance.- Parameters:
id- The command ID.
-
-
Method Details
-
from
Creates a tag with the given id as value.- Parameters:
id- The ID of the command.- Returns:
- The created tag.
-
key
Description copied from interface:Metrics.TagRetrieves the tag key.- Specified by:
keyin interfaceMetrics.Tag- Returns:
- The tag key.
-
value
Description copied from interface:Metrics.TagRetrieves the tag value.- Specified by:
valuein interfaceMetrics.Tag- Returns:
- The tag value.
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-