public class SimpleArgument<T> extends java.lang.Object implements Argument<T>
| Constructor and Description |
|---|
SimpleArgument(java.lang.String name,
TypeToken<T> type) |
SimpleArgument(java.lang.String name,
TypeToken<T> type,
boolean nullable) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<ParseResult<T>> |
getDefaultValue() |
ArgumentKey |
getKey() |
java.lang.String |
getName() |
<P> java.util.Optional<P> |
getProfile(ArgumentProfileNamespace<P> key) |
TypeToken<T> |
getType() |
boolean |
hasDefaultValue() |
Meta |
meta() |
@Nullable MetaHolder |
parentMeta() |
<P extends ArgumentProfile<P>> |
withProfile(P profile) |
<NEW> Argument<NEW> |
withType(TypeToken<NEW> type) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdefaultValue, of, of, of, of, profiled, profiledempty, metaCollectorpublic SimpleArgument(java.lang.String name,
TypeToken<T> type,
@Deprecated
boolean nullable)
public java.lang.String getName()
public ArgumentKey getKey()
public TypeToken<T> getType()
getType in interface Requirement<T>public Meta meta()
meta in interface MetaHolder@Nullable public @Nullable MetaHolder parentMeta()
parentMeta in interface MetaHolderpublic java.util.Optional<ParseResult<T>> getDefaultValue()
getDefaultValue in interface Argument<T>public boolean hasDefaultValue()
hasDefaultValue in interface Argument<T>@ApiStatus.Experimental public <P extends ArgumentProfile<P>> SimpleArgument<T> withProfile(P profile)
withProfile in interface Argument<T>@ApiStatus.Experimental public <P> java.util.Optional<P> getProfile(ArgumentProfileNamespace<P> key)
getProfile in interface Argument<T>