Class HelpEntry<S extends Source>
java.lang.Object
studio.mevera.imperat.command.tree.help.HelpEntry<S>
- Type Parameters:
S- The type ofSourcefrom which the command was executed.
Represents a final, immutable entry for a single executable command in the help system.
This class encapsulates a ParameterNode that represents an executable command,
along with its corresponding CommandUsage pathway. It ensures that only
executable nodes can be used to create a help entry, making it a reliable data
model for displaying help information.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this HelpEntry to another object for equality.ParameterNode<S,?> getNode()Retrieves the parameter node associated with this help entry.@NotNull CommandUsage<S>Retrieves the command usage pathway associated with this help entry.inthashCode()Computes the hash code for this HelpEntry based on its parameter node.
-
Method Details
-
getPathway
Retrieves the command usage pathway associated with this help entry.- Returns:
- The pathway of the command.
-
getNode
Retrieves the parameter node associated with this help entry.- Returns:
- The parameter node.
-
equals
Compares this HelpEntry to another object for equality.Two help entries are considered equal if their underlying parameter nodes are equal.
-
hashCode
public int hashCode()Computes the hash code for this HelpEntry based on its parameter node.
-