Class LifecycleMapping<K,V>

java.lang.Object
org.eclipse.net4j.util.lifecycle.LifecycleMapping<K,V>

public class LifecycleMapping<K,V> extends Object
A canonical mapping from keys that are potentially ILifecycle to arbitrary values. A mapping is automatically removed if its key is just weakly reachable, or if its key is an ILifecycle and is deactivated.
Since:
3.27
Author:
Eike Stepper
  • Constructor Details

    • LifecycleMapping

      public LifecycleMapping()
  • Method Details

    • getMapping

      public V getMapping(K lifecycle)
    • getOrAddMapping

      public V getOrAddMapping(K lifecycle, Supplier<V> valueSupplier)
    • addMapping

      public boolean addMapping(K lifecycle, V value)
    • removeMapping

      public V removeMapping(K lifecycle)