Package org.eclipse.net4j.util.lifecycle

# 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 Summary

Constructors
Constructor
Description
`LifecycleMapping()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`addMapping(K lifecycle, V value)`
`V`
`getMapping(K lifecycle)`
`V`
`getOrAddMapping(K lifecycle, Supplier<V> valueSupplier)`
`V`
`removeMapping(K lifecycle)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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)