Class ConverterCollections.ConverterMapListener<K,V>

All Implemented Interfaces:
MapListener<K,V>, EventListener
Direct Known Subclasses:
ConverterCollections.ConverterCacheListener
Enclosing class:
ConverterCollections

public static class ConverterCollections.ConverterMapListener<K,V> extends MapListenerSupport.WrapperListener<K,V> implements MapListener<K,V>
A converter MapListener that converts events of the underlying MapListener for the underlying map.
  • Field Details

    • m_map

      protected ObservableMap<K,V> m_map
      The converting Map the will be the source of converted events.
    • m_convKey

      protected Converter<K,K> m_convKey
      The Converter to view an underlying CacheEvent's key.
    • m_convVal

      protected Converter<V,V> m_convVal
      The Converter to view an underlying CacheEvent's value.
  • Constructor Details

    • ConverterMapListener

      public ConverterMapListener(ObservableMap<K,V> map, MapListener<K,V> listener, Converter<K,K> convKey, Converter<V,V> convVal)
      Constructor.
      Parameters:
      map - the Map that should be the source for converted events
      listener - the underlying MapListener
      convKey - the Converter to view the underlying MapEvent's key
      convVal - the Converter to view the underlying MapEvent's values
  • Method Details

    • onMapEvent

      protected void onMapEvent(MapEvent<K,V> evt)
      Description copied from class: MapListenerSupport.WrapperListener
      Invoked when a map entry has been inserted, updated or deleted. To determine what action has occurred, use MapEvent.getId().
      Overrides:
      onMapEvent in class MapListenerSupport.WrapperListener<K,V>
      Parameters:
      evt - the MapEvent carrying the insert, update or delete information
    • equals

      public boolean equals(Object o)
      Compare the ConverterMapListener with another object to determine equality.
      Overrides:
      equals in class MapListenerSupport.WrapperListener<K,V>
      Returns:
      true iff this ConverterMapListener and the passed object are equivalent listeners
    • getObservableMap

      public ObservableMap<K,V> getObservableMap()
      Return the underlying ObservableMap.
      Returns:
      the underlying ObservableMap
    • getConverterKeyUp

      public Converter<K,K> getConverterKeyUp()
      Return the Converter used to view an underlying CacheEvent's key through.
      Returns:
      the Converter from an underlying CacheEvent's key
    • getConverterValueUp

      public Converter<V,V> getConverterValueUp()
      Return the Converter used to view an underlying CacheEvent's value through.
      Returns:
      the Converter from an underlying CacheEvent's value