classpublicabstractPriority 3
WrappedArgumentType
com.hypixel.hytale.server.core.command.system.arguments.types.WrappedArgumentType
extends SingleArgumentType
2
Methods
2
Public Methods
1
Fields
1
Constructors
Constructors
public
WrappedArgumentType(Message name, ArgumentType<DataType> wrappedArgumentType, String argumentUsage, String[] examples)Methods
Public Methods (2)
public
DataType get(MultiArgumentContext context)@Nullable
public
String[] getExamples()@Nonnull@Override
Fields
Protected Fields (1)
protected
ArgumentType<DataType> wrappedArgumentTypeInheritance
Parent
Current
Interface
Child
Use mouse wheel to zoom, drag to pan. Click nodes to navigate.
Related Classes
Used By
Source Code
package com.hypixel.hytale.server.core.command.system.arguments.types;
import com.hypixel.hytale.server.core.Message;
import java.util.Arrays;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public abstract class WrappedArgumentType<DataType> extends SingleArgumentType<DataType> {
protected final ArgumentType<DataType> wrappedArgumentType;
public WrappedArgumentType(Message name, ArgumentType<DataType> wrappedArgumentType, @Nonnull String argumentUsage, @Nullable String... examples) {
super(name, argumentUsage, examples);
this.wrappedArgumentType = wrappedArgumentType;
}
@Nonnull
@Override
public String[] getExamples() {
return Arrays.equals((Object[])this.examples, (Object[])EMPTY_EXAMPLES) ? this.wrappedArgumentType.getExamples() : this.examples;
}
@Nullable
public DataType get(@Nonnull MultiArgumentContext context) {
return context.get(this);
}
}