public class WeakObjectRegistry<E> extends AbstractSet<E>
Object.equals(java.lang.Object)
and Object.hashCode()
methods.Constructor and Description |
---|
WeakObjectRegistry()
Constructs a new, empty object registry.
|
WeakObjectRegistry(Collection<? extends E> c)
Constructs a new WeakObjectRegistry containing the elements in the specified collection.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E object) |
void |
clear() |
boolean |
contains(Object o) |
E |
get(Object key)
Retrieves the stored object that is equal to the supplied key object.
|
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
int |
size() |
equals, hashCode, removeAll
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public WeakObjectRegistry()
public WeakObjectRegistry(Collection<? extends E> c)
c
- The collection whose elements are to be placed into this object registry.NullPointerException
- If the specified collection is null.public E get(Object key)
key
- The object that should be used as the search key for the operation.public int size()
size
in interface Collection<E>
size
in interface Set<E>
size
in class AbstractCollection<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface Set<E>
contains
in class AbstractCollection<E>
public boolean add(E object)
add
in interface Collection<E>
add
in interface Set<E>
add
in class AbstractCollection<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in interface Set<E>
remove
in class AbstractCollection<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
clear
in class AbstractCollection<E>
Copyright © 2015-2019 Eclipse Foundation. All Rights Reserved.