类 ConfiguredMap<K,V>

所有已实现的接口:
Map<K,V>

public class ConfiguredMap<K,V> extends CachedConfigValue<Map<K,V>,V> implements Map<K,V>
  • 字段详细资料

    • constructor

      @NotNull protected final @NotNull Supplier<? extends Map<K,V>> constructor
    • keyAdapter

      @NotNull protected final @NotNull ValueAdapter<K> keyAdapter
    • valueAdapter

      @NotNull protected final @NotNull ValueAdapter<V> valueAdapter
  • 构造器详细资料

  • 方法详细资料

    • builderOf

      public static <V> ConfigMapCreator<String,V> builderOf(@NotNull @NotNull Class<V> valueType)
    • builderOf

      public static <K, V> ConfigMapCreator<K,V> builderOf(@NotNull @NotNull ValueType<K> keyType, @NotNull @NotNull ValueType<V> valueType)
    • builderOf

      public static <K, V> ConfigMapCreator<K,V> builderOf(@NotNull @NotNull Class<K> keyType, @NotNull @NotNull Class<V> valueType)
    • of

      public static <K, V> ConfiguredMap<K,V> of(@NotNull @NotNull Supplier<? extends Map<K,V>> constructor, @NotNull @NotNull ValueAdapter<K> keyAdapter, @NotNull @NotNull ValueAdapter<V> valueAdapter)
    • keyAdapter

      @NotNull public @NotNull ValueAdapter<K> keyAdapter()
    • keyType

      @NotNull public @NotNull ValueType<K> keyType()
    • valueAdapter

      @NotNull public @NotNull ValueAdapter<V> valueAdapter()
    • valueType

      @NotNull public @NotNull ValueType<V> valueType()
    • get

      @NotNull public @NotNull Map<K,V> get()
      从类复制的说明: ConfigValue
      Gets the configured value (i.e., the value read from the source).
      If no default value was written during initialization, you can use the ConfigValue.getOrDefault() method to obtain the default value when this value is empty.
      指定者:
      get 在类中 ConfigValue<Map<K,V>,V>
      返回:
      Configured value
    • get

      public V get(Object key)
      指定者:
      get 在接口中 Map<K,V>
    • getNotNull

      public V getNotNull(@Nullable K key)
    • set

      public void set(@Nullable @Nullable Map<K,V> value)
      从类复制的说明: ConfigValue
      Sets the value of this configuration.
      After setting, the configuration file will NOT be saved automatically. To save, call ConfigurationHolder.save().
      指定者:
      set 在类中 ConfigValue<Map<K,V>,V>
      参数:
      value - The value to set
    • handle

      @NotNull public <T> T handle(Function<Map<K,V>,T> function)
    • modify

      @NotNull public @NotNull ConfiguredMap<K,V> modify(Consumer<Map<K,V>> consumer)
    • size

      public int size()
      指定者:
      size 在接口中 Map<K,V>
    • isEmpty

      public boolean isEmpty()
      指定者:
      isEmpty 在接口中 Map<K,V>
    • containsKey

      public boolean containsKey(Object key)
      指定者:
      containsKey 在接口中 Map<K,V>
    • containsValue

      public boolean containsValue(Object value)
      指定者:
      containsValue 在接口中 Map<K,V>
    • put

      @Nullable public V put(K key, V value)
      指定者:
      put 在接口中 Map<K,V>
    • remove

      public V remove(Object key)
      指定者:
      remove 在接口中 Map<K,V>
    • putAll

      public void putAll(@NotNull @NotNull Map<? extends K,? extends V> m)
      指定者:
      putAll 在接口中 Map<K,V>
    • clear

      public void clear()
      指定者:
      clear 在接口中 Map<K,V>
    • keySet

      @NotNull public @NotNull Set<K> keySet()
      指定者:
      keySet 在接口中 Map<K,V>
    • values

      @NotNull public @NotNull Collection<V> values()
      指定者:
      values 在接口中 Map<K,V>
    • entrySet

      @NotNull public @NotNull @Unmodifiable Set<Map.Entry<K,V>> entrySet()
      指定者:
      entrySet 在接口中 Map<K,V>