Class SimpleCommandMeta

java.lang.Object
cloud.commandframework.meta.CommandMeta
cloud.commandframework.meta.SimpleCommandMeta

@API(status=STABLE) public class SimpleCommandMeta extends CommandMeta
A simple immutable string-string map containing command meta
  • Constructor Details

  • Method Details

    • builder

      public static @NonNull SimpleCommandMeta.Builder builder()
      Create a new meta builder
      Returns:
      Builder instance
    • empty

      public static @NonNull SimpleCommandMeta empty()
      Create an empty simple command meta instance
      Returns:
      Empty instance
    • getValue

      @Deprecated public final @NonNull Optional<String> getValue(@NonNull String key)
      Deprecated.
      Description copied from class: CommandMeta
      Get the value associated with a key
      Specified by:
      getValue in class CommandMeta
      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 class CommandMeta
      Parameters:
      key - Key
      defaultValue - Default value
      Returns:
      Value, or default value
    • get

      public final <V> @NonNull Optional<V> get(@NonNull CommandMeta.Key<V> key)
      Description copied from class: CommandMeta
      Get the value associated with a key.
      Specified by:
      get in class CommandMeta
      Type Parameters:
      V - Value type
      Parameters:
      key - Key
      Returns:
      Optional that may contain the associated value
    • getOrDefault

      public final <V> @NonNull V getOrDefault(@NonNull CommandMeta.Key<V> key, @NonNull V defaultValue)
      Description copied from class: CommandMeta
      Get the value if it exists, else return the default value.
      Specified by:
      getOrDefault in class CommandMeta
      Type Parameters:
      V - Value type
      Parameters:
      key - Key
      defaultValue - Default value
      Returns:
      Value, or default value
    • getAll

      @Deprecated public final @NonNull Map<@NonNull String,@NonNull String> getAll()
      Deprecated.
      Description copied from class: CommandMeta
      Get a copy of the meta map
      Specified by:
      getAll in class CommandMeta
      Returns:
      Copy of meta map
    • getAllValues

      public final @NonNull Map<@NonNull String,@NonNull ?> getAllValues()
      Description copied from class: CommandMeta
      Get a copy of the meta map, without type information.
      Specified by:
      getAllValues in class CommandMeta
      Returns:
      Copy of meta map
    • equals

      public final boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object