Class WeakCollectionChangeListener<E>

java.lang.Object
io.jmix.flowui.model.impl.WeakCollectionChangeListener<E>
Type Parameters:
E - the type of elements in the collection container
All Implemented Interfaces:
Consumer<CollectionContainer.CollectionChangeEvent<E>>

public class WeakCollectionChangeListener<E> extends Object implements Consumer<CollectionContainer.CollectionChangeEvent<E>>
A weak wrapper for a Consumer that listens to CollectionContainer.CollectionChangeEvents. This class ensures that the listener does not prevent garbage collection of the original Consumer, thus avoiding memory leaks.