Class WeakBooleanHashMap<V>

java.lang.Object
one.pkg.tinyutils.map.WeakBooleanHashMap<V>
Type Parameters:
V - the type of mapped values

public class WeakBooleanHashMap<V> extends Object
A Map-like data structure that uses primitive boolean keys and weakly references its values. Since there are only two possible boolean values, this implementation simply uses two references internally and is highly optimized.
  • Constructor Details

    • WeakBooleanHashMap

      public WeakBooleanHashMap()
  • Method Details

    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • get

      @Nullable public V get(boolean key)
    • put

      public V put(boolean key, V value)
    • remove

      public V remove(boolean key)
    • containsKey

      public boolean containsKey(boolean key)
    • clear

      public void clear()