Package net.minecraft.network.chat
Record Class PreviewableCommand.Argument<S>
java.lang.Object
java.lang.Record
net.minecraft.network.chat.PreviewableCommand.Argument<S>
- Enclosing class:
- PreviewableCommand<S>
public static record PreviewableCommand.Argument<S>(com.mojang.brigadier.tree.ArgumentCommandNode<S,?> node, com.mojang.brigadier.context.ParsedArgument<S,?> parsedValue, PreviewedArgument<?> previewType)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final com.mojang.brigadier.tree.ArgumentCommandNode<S,
?> The field for thenode
record component.private final com.mojang.brigadier.context.ParsedArgument<S,
?> The field for theparsedValue
record component.private final PreviewedArgument<?>
The field for thepreviewType
record component. -
Constructor Summary
ConstructorDescriptionArgument
(com.mojang.brigadier.tree.ArgumentCommandNode<S, ?> node, com.mojang.brigadier.context.ParsedArgument<S, ?> parsedValue, PreviewedArgument<?> previewType) Creates an instance of aArgument
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
com.mojang.brigadier.tree.ArgumentCommandNode<S,
?> node()
Returns the value of thenode
record component.com.mojang.brigadier.context.ParsedArgument<S,
?> Returns the value of theparsedValue
record component.Returns the value of thepreviewType
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
node
The field for thenode
record component. -
parsedValue
The field for theparsedValue
record component. -
previewType
The field for thepreviewType
record component.
-
-
Constructor Details
-
Argument
public Argument(com.mojang.brigadier.tree.ArgumentCommandNode<S, ?> node, com.mojang.brigadier.context.ParsedArgument<S, ?> parsedValue, PreviewedArgument<?> previewType) Creates an instance of aArgument
record class.- Parameters:
node
- the value for thenode
record componentparsedValue
- the value for theparsedValue
record componentpreviewType
- the value for thepreviewType
record component
-
-
Method Details
-
name
-
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)
. -
node
Returns the value of thenode
record component.- Returns:
- the value of the
node
record component
-
parsedValue
Returns the value of theparsedValue
record component.- Returns:
- the value of the
parsedValue
record component
-
previewType
Returns the value of thepreviewType
record component.- Returns:
- the value of the
previewType
record component
-