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 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
ModifierConstructorDescriptionprotected
SimpleCommandMeta(@NonNull Map<@NonNull String,@NonNull String> metaMap)
Deprecated.protected
SimpleCommandMeta(SimpleCommandMeta source)
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull SimpleCommandMeta.Builder
builder()
Create a new meta builderstatic @NonNull SimpleCommandMeta
empty()
Create an empty simple command meta instanceboolean
<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.<V> @NonNull V
getOrDefault(@NonNull CommandMeta.Key<V> key, @NonNull V defaultValue)
Get the value if it exists, else return the default value.@NonNull String
getOrDefault(@NonNull String key, @NonNull String defaultValue)
Deprecated.Deprecated.int
hashCode()
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:CommandMeta
Get the value associated with a key- Specified by:
getValue
in 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:CommandMeta
Get the value if it exists, else return the default value- Specified by:
getOrDefault
in classCommandMeta
- Parameters:
key
- KeydefaultValue
- Default value- Returns:
- Value, or default value
-
get
Description copied from class:CommandMeta
Get the value associated with a key.- Specified by:
get
in classCommandMeta
- Type Parameters:
V
- Value type- Parameters:
key
- Key- Returns:
- Optional that may contain the associated value
-
getOrDefault
Description copied from class:CommandMeta
Get the value if it exists, else return the default value.- Specified by:
getOrDefault
in classCommandMeta
- Type Parameters:
V
- Value type- Parameters:
key
- KeydefaultValue
- Default value- Returns:
- Value, or default value
-
getAll
Deprecated.Description copied from class:CommandMeta
Get a copy of the meta map- Specified by:
getAll
in classCommandMeta
- Returns:
- Copy of meta map
-
getAllValues
Description copied from class:CommandMeta
Get a copy of the meta map, without type information.- Specified by:
getAllValues
in classCommandMeta
- Returns:
- Copy of meta map
-
equals
-
hashCode
public final int hashCode()
-