Class SimpleCommandMeta


  • public class SimpleCommandMeta
    extends CommandMeta
    A simple immutable string-string map containing command meta
    • Constructor Detail

      • SimpleCommandMeta

        @Deprecated
        protected SimpleCommandMeta​(@NonNull java.util.Map<@NonNull java.lang.String,​@NonNull java.lang.String> metaMap)
        Deprecated.
    • Method Detail

      • empty

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

        @Deprecated
        public final @NonNull java.util.Optional<java.lang.String> getValue​(@NonNull java.lang.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 java.lang.String getOrDefault​(@NonNull java.lang.String key,
                                                            @NonNull java.lang.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 java.util.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 java.util.Map<@NonNull java.lang.String,​@NonNull java.lang.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 java.util.Map<@NonNull java.lang.String,​?> 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​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object