Class RegionalHashMap<K extends Locatable, V>

java.lang.Object
com.github.darksoulq.abyssallib.server.util.regional.RegionalHashMap<K,V>
All Implemented Interfaces:
Map<K,V>

public class RegionalHashMap<K extends Locatable, V> extends Object implements Map<K,V>
  • Constructor Details

    • RegionalHashMap

      public RegionalHashMap()
    • RegionalHashMap

      public RegionalHashMap(boolean forceConcurrent)
  • Method Details

    • size

      public int size()
      Specified by:
      size in interface Map<K extends Locatable, V>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Map<K extends Locatable, V>
    • containsKey

      public boolean containsKey(@Nullable @Nullable Object key)
      Specified by:
      containsKey in interface Map<K extends Locatable, V>
    • containsValue

      public boolean containsValue(@Nullable @Nullable Object value)
      Specified by:
      containsValue in interface Map<K extends Locatable, V>
    • get

      @Nullable public V get(@Nullable @Nullable Object key)
      Specified by:
      get in interface Map<K extends Locatable, V>
    • put

      @Nullable public V put(@NotNull K key, @NotNull V value)
      Specified by:
      put in interface Map<K extends Locatable, V>
    • remove

      @Nullable public V remove(@Nullable @Nullable Object key)
      Specified by:
      remove in interface Map<K extends Locatable, V>
    • putAll

      public void putAll(@NotNull @NotNull Map<? extends K, ? extends V> m)
      Specified by:
      putAll in interface Map<K extends Locatable, V>
    • clear

      public void clear()
      Specified by:
      clear in interface Map<K extends Locatable, V>
    • keySet

      @NotNull public @NotNull Set<K> keySet()
      Specified by:
      keySet in interface Map<K extends Locatable, V>
    • values

      @NotNull public @NotNull Collection<V> values()
      Specified by:
      values in interface Map<K extends Locatable, V>
    • entrySet

      @NotNull public @NotNull Set<Map.Entry<K,V>> entrySet()
      Specified by:
      entrySet in interface Map<K extends Locatable, V>
    • getOrDefault

      @Nullable public V getOrDefault(@Nullable @Nullable Object key, @Nullable V defaultValue)
      Specified by:
      getOrDefault in interface Map<K extends Locatable, V>
    • forEach

      public void forEach(@NotNull @NotNull BiConsumer<? super K, ? super V> action)
      Specified by:
      forEach in interface Map<K extends Locatable, V>
    • replaceAll

      public void replaceAll(@NotNull @NotNull BiFunction<? super K, ? super V, ? extends V> function)
      Specified by:
      replaceAll in interface Map<K extends Locatable, V>
    • putIfAbsent

      @Nullable public V putIfAbsent(@NotNull K key, @NotNull V value)
      Specified by:
      putIfAbsent in interface Map<K extends Locatable, V>
    • remove

      public boolean remove(@Nullable @Nullable Object key, @Nullable @Nullable Object value)
      Specified by:
      remove in interface Map<K extends Locatable, V>
    • replace

      public boolean replace(@NotNull K key, @NotNull V oldValue, @NotNull V newValue)
      Specified by:
      replace in interface Map<K extends Locatable, V>
    • replace

      @Nullable public V replace(@NotNull K key, @NotNull V value)
      Specified by:
      replace in interface Map<K extends Locatable, V>
    • computeIfAbsent

      @Nullable public V computeIfAbsent(@NotNull K key, @NotNull @NotNull Function<? super K, ? extends V> mappingFunction)
      Specified by:
      computeIfAbsent in interface Map<K extends Locatable, V>
    • computeIfPresent

      @Nullable public V computeIfPresent(@NotNull K key, @NotNull @NotNull BiFunction<? super K, ? super V, ? extends V> remappingFunction)
      Specified by:
      computeIfPresent in interface Map<K extends Locatable, V>
    • compute

      @Nullable public V compute(@NotNull K key, @NotNull @NotNull BiFunction<? super K, ? super V, ? extends V> remappingFunction)
      Specified by:
      compute in interface Map<K extends Locatable, V>
    • merge

      @Nullable public V merge(@NotNull K key, @NotNull V value, @NotNull @NotNull BiFunction<? super V, ? super V, ? extends V> remappingFunction)
      Specified by:
      merge in interface Map<K extends Locatable, V>
    • getRegion

      @NotNull public @NotNull Map<K,V> getRegion(@NotNull @NotNull RegionKey key)