Class ObservableMap<K,V>

java.lang.Object
eu.hansolo.toolbox.observables.ObservableMap<K,V>
All Implemented Interfaces:
Cloneable, Map<K,V>

public class ObservableMap<K,V> extends Object implements Map<K,V>, Cloneable
  • Constructor Details

    • ObservableMap

      public ObservableMap()
    • ObservableMap

      public ObservableMap(int capacity)
    • ObservableMap

      public ObservableMap(int capacity, float loadFactor)
    • ObservableMap

      public ObservableMap(int capacity, float loadFactor, int concurrencyLevel)
    • ObservableMap

      public ObservableMap(Map<? extends K,? extends V> map)
  • Method Details

    • get

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

      public V put(K key, V value)
      Specified by:
      put in interface Map<K,V>
    • putAll

      public void putAll(Map<? extends K,? extends V> map)
      Specified by:
      putAll in interface Map<K,V>
    • remove

      public V remove(Object key)
      Specified by:
      remove in interface Map<K,V>
    • clear

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

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

      public boolean containsValue(Object value)
      Specified by:
      containsValue in interface Map<K,V>
    • contains

      public boolean contains(Object value)
    • keySet

      public ConcurrentHashMap.KeySetView<K,V> keySet()
      Specified by:
      keySet in interface Map<K,V>
    • keySet

      public ConcurrentHashMap.KeySetView<K,V> keySet(V mappedValue)
    • values

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

      public Set<Map.Entry<K,V>> entrySet()
      Specified by:
      entrySet in interface Map<K,V>
    • keys

      public Enumeration<K> keys()
    • elements

      public Enumeration<V> elements()
    • mappingCount

      public long mappingCount()
    • size

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

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

      public V getOrDefault(Object key, V defaultValue)
      Specified by:
      getOrDefault in interface Map<K,V>
    • putIfAbsent

      public V putIfAbsent(K key, V value)
      Specified by:
      putIfAbsent in interface Map<K,V>
    • remove

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

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

      public V replace(K key, V value)
      Specified by:
      replace in interface Map<K,V>
    • computeIfAbsent

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

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

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

      public V merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
      Specified by:
      merge in interface Map<K,V>
    • forEach

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

      public void forEach(long parallelismThreshold, BiConsumer<? super K,? super V> action)
    • forEach

      public <U> void forEach(long parallelismThreshold, BiFunction<? super K,? super V,? extends U> transformer, Consumer<? super U> action)
    • search

      public <U> U search(long parallelismThreshold, BiFunction<? super K,? super V,? extends U> searchFunction)
    • reduce

      public <U> U reduce(long parallelismThreshold, BiFunction<? super K,? super V,? extends U> transformer, BiFunction<? super U,? super U,? extends U> reducer)
    • reduceToDouble

      public double reduceToDouble(long parallelismThreshold, ToDoubleBiFunction<? super K,? super V> transformer, double basis, DoubleBinaryOperator reducer)
    • reduceToLong

      public long reduceToLong(long parallelismThreshold, ToLongBiFunction<? super K,? super V> transformer, long basis, LongBinaryOperator reducer)
    • reduceToInt

      public int reduceToInt(long parallelismThreshold, ToIntBiFunction<? super K,? super V> transformer, int basis, IntBinaryOperator reducer)
    • forEachKey

      public void forEachKey(long parallelismThreshold, Consumer<? super K> action)
    • forEachKey

      public <U> void forEachKey(long parallelismThreshold, Function<? super K,? extends U> transformer, Consumer<? super U> action)
    • searchKeys

      public <U> U searchKeys(long parallelismThreshold, Function<? super K,? extends U> searchFunction)
    • reduceKeys

      public K reduceKeys(long parallelismThreshold, BiFunction<? super K,? super K,? extends K> reducer)
    • reduceKeys

      public <U> U reduceKeys(long parallelismThreshold, Function<? super K,? extends U> transformer, BiFunction<? super U,? super U,? extends U> reducer)
    • reduceKeysToDouble

      public double reduceKeysToDouble(long parallelismThreshold, ToDoubleFunction<? super K> transformer, double basis, DoubleBinaryOperator reducer)
    • reduceKeysToLong

      public long reduceKeysToLong(long parallelismThreshold, ToLongFunction<? super K> transformer, long basis, LongBinaryOperator reducer)
    • reduceKeysToInt

      public int reduceKeysToInt(long parallelismThreshold, ToIntFunction<? super K> transformer, int basis, IntBinaryOperator reducer)
    • forEachValue

      public void forEachValue(long parallelismThreshold, Consumer<? super V> action)
    • forEachValue

      public <U> void forEachValue(long parallelismThreshold, Function<? super V,? extends U> transformer, Consumer<? super U> action)
    • searchValues

      public <U> U searchValues(long parallelismThreshold, Function<? super V,? extends U> searchFunction)
    • reduceValues

      public V reduceValues(long parallelismThreshold, BiFunction<? super V,? super V,? extends V> reducer)
    • reduceValues

      public <U> U reduceValues(long parallelismThreshold, Function<? super V,? extends U> transformer, BiFunction<? super U,? super U,? extends U> reducer)
    • reduceValuesToDouble

      public double reduceValuesToDouble(long parallelismThreshold, ToDoubleFunction<? super V> transformer, double basis, DoubleBinaryOperator reducer)
    • reduceValuesToLong

      public long reduceValuesToLong(long parallelismThreshold, ToLongFunction<? super V> transformer, long basis, LongBinaryOperator reducer)
    • reduceValuesToInt

      public int reduceValuesToInt(long parallelismThreshold, ToIntFunction<? super V> transformer, int basis, IntBinaryOperator reducer)
    • forEachEntry

      public void forEachEntry(long parallelismThreshold, Consumer<? super Map.Entry<K,V>> action)
    • forEachEntry

      public <U> void forEachEntry(long parallelismThreshold, Function<Map.Entry<K,V>,? extends U> transformer, Consumer<? super U> action)
    • searchEntries

      public <U> U searchEntries(long parallelismThreshold, Function<Map.Entry<K,V>,? extends U> searchFunction)
    • reduceEntries

      public Map.Entry<K,V> reduceEntries(long parallelismThreshold, BiFunction<Map.Entry<K,V>,Map.Entry<K,V>,? extends Map.Entry<K,V>> reducer)
    • reduceEntries

      public <U> U reduceEntries(long parallelismThreshold, Function<Map.Entry<K,V>,? extends U> transformer, BiFunction<? super U,? super U,? extends U> reducer)
    • reduceEntriesToDouble

      public double reduceEntriesToDouble(long parallelismThreshold, ToDoubleFunction<Map.Entry<K,V>> transformer, double basis, DoubleBinaryOperator reducer)
    • reduceEntriesToLong

      public long reduceEntriesToLong(long parallelismThreshold, ToLongFunction<Map.Entry<K,V>> transformer, long basis, LongBinaryOperator reducer)
    • reduceEntriesToInt

      public int reduceEntriesToInt(long parallelismThreshold, ToIntFunction<Map.Entry<K,V>> transformer, int basis, IntBinaryOperator reducer)
    • replaceAll

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

      public ObservableMap<K,V> clone()
      Overrides:
      clone in class Object
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface Map<K,V>
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map<K,V>
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addMapChangeObserver

      public void addMapChangeObserver(EvtType type, EvtObserver<MapChangeEvt<K,V>> observer)
    • removeMapChangeObserver

      public void removeMapChangeObserver(EvtType type, EvtObserver<MapChangeEvt<K,V>> observer)
    • removeAllMapChangeObservers

      public void removeAllMapChangeObservers()
    • fireMapChangeEvt

      public void fireMapChangeEvt(MapChangeEvt<K,V> evt)