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
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.brigadier.tree.ArgumentCommandNode<S,?> The field for thenoderecord component.private final com.mojang.brigadier.context.ParsedArgument<S,?> The field for theparsedValuerecord component.private final PreviewedArgument<?>The field for thepreviewTyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionArgument(com.mojang.brigadier.tree.ArgumentCommandNode<S, ?> node, com.mojang.brigadier.context.ParsedArgument<S, ?> parsedValue, PreviewedArgument<?> previewType) Creates an instance of aArgumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()com.mojang.brigadier.tree.ArgumentCommandNode<S,?> node()Returns the value of thenoderecord component.com.mojang.brigadier.context.ParsedArgument<S,?> Returns the value of theparsedValuerecord component.Returns the value of thepreviewTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
node
The field for thenoderecord component. -
parsedValue
The field for theparsedValuerecord component. -
previewType
The field for thepreviewTyperecord 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 aArgumentrecord class.- Parameters:
node- the value for thenoderecord componentparsedValue- the value for theparsedValuerecord componentpreviewType- the value for thepreviewTyperecord 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 thenoderecord component.- Returns:
- the value of the
noderecord component
-
parsedValue
Returns the value of theparsedValuerecord component.- Returns:
- the value of the
parsedValuerecord component
-
previewType
Returns the value of thepreviewTyperecord component.- Returns:
- the value of the
previewTyperecord component
-