Package cloud.commandframework.meta
Class SimpleCommandMeta
java.lang.Object
cloud.commandframework.meta.CommandMeta
cloud.commandframework.meta.SimpleCommandMeta
A simple immutable string-string map containing command meta
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class cloud.commandframework.meta.CommandMeta
CommandMeta.Key<V> -
Field Summary
Fields inherited from class cloud.commandframework.meta.CommandMeta
DESCRIPTION, HIDDEN, LONG_DESCRIPTION -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleCommandMeta(@NonNull Map<@NonNull String, @NonNull String> metaMap) Deprecated.protectedSimpleCommandMeta(SimpleCommandMeta source) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull SimpleCommandMeta.Builderbuilder()Create a new meta builderstatic @NonNull SimpleCommandMetaempty()Create an empty simple command meta instancefinal booleanfinal <V> @NonNull Optional<V>get(@NonNull CommandMeta.Key<V> key) Get the value associated with a key.getAll()Deprecated.Get a copy of the meta map, without type information.final <V> @NonNull VgetOrDefault(@NonNull CommandMeta.Key<V> key, @NonNull V defaultValue) Get the value if it exists, else return the default value.final @NonNull StringgetOrDefault(@NonNull String key, @NonNull String defaultValue) Deprecated.Deprecated.final inthashCode()Methods inherited from class cloud.commandframework.meta.CommandMeta
simple, toString
-
Constructor Details
-
SimpleCommandMeta
Deprecated. -
SimpleCommandMeta
-
-
Method Details
-
builder
Create a new meta builder- Returns:
- Builder instance
-
empty
Create an empty simple command meta instance- Returns:
- Empty instance
-
getValue
Deprecated.Description copied from class:CommandMetaGet the value associated with a key- Specified by:
getValuein classCommandMeta- Parameters:
key- Key- Returns:
- Optional that may contain the associated value
-
getOrDefault
@Deprecated public final @NonNull String getOrDefault(@NonNull String key, @NonNull String defaultValue) Deprecated.Description copied from class:CommandMetaGet the value if it exists, else return the default value- Specified by:
getOrDefaultin classCommandMeta- Parameters:
key- KeydefaultValue- Default value- Returns:
- Value, or default value
-
get
Description copied from class:CommandMetaGet the value associated with a key.- Specified by:
getin classCommandMeta- Type Parameters:
V- Value type- Parameters:
key- Key- Returns:
- Optional that may contain the associated value
-
getOrDefault
Description copied from class:CommandMetaGet the value if it exists, else return the default value.- Specified by:
getOrDefaultin classCommandMeta- Type Parameters:
V- Value type- Parameters:
key- KeydefaultValue- Default value- Returns:
- Value, or default value
-
getAll
Deprecated.Description copied from class:CommandMetaGet a copy of the meta map- Specified by:
getAllin classCommandMeta- Returns:
- Copy of meta map
-
getAllValues
Description copied from class:CommandMetaGet a copy of the meta map, without type information.- Specified by:
getAllValuesin classCommandMeta- Returns:
- Copy of meta map
-
equals
-
hashCode
public final int hashCode()
-