K
- the type of objects that can be matchedV
- the type of objects that can be registeredpublic interface Registry<K,V> extends Iterable<Registration<K,? extends V>>
Selector
s to map their objects.Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the
Registry , resetting its state and calling Registration.cancel() for any active Registration . |
Registration<K,V> |
register(Selector<K> sel,
V obj)
Assign the given
Selector with the given object. |
List<Registration<K,? extends V>> |
select(K key)
|
boolean |
unregister(K key)
Remove any objects matching this
key . |
forEach, iterator, spliterator
Registration<K,V> register(Selector<K> sel, V obj)
Selector
with the given object.sel
- The left-hand side of the Selector comparison check.obj
- The object to assign.boolean unregister(K key)
key
. This will unregister all objects matching the given
key. There's no provision for removing only a specific object.key
- The key to be matched by the SelectorsList<Registration<K,? extends V>> select(K key)
key
- The key for the Selectors to matchList
of Registration
s whose Selector
matches the given key.void clear()
Registry
, resetting its state and calling Registration.cancel()
for any active Registration
.Copyright © 2016. All rights reserved.