Class WeakObjectRegistry<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
org.eclipse.rdf4j.sail.memory.model.WeakObjectRegistry<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public class WeakObjectRegistry<E> extends AbstractSet<E>
An object registry that uses weak references to keep track of the stored objects. The registry can be used to retrieve stored objects using another, equivalent object. As such, it can be used to prevent the use of duplicates in another data structure, reducing memory usage. The objects that are being stored should properly implement the Object.equals(java.lang.Object) and Object.hashCode() methods.