Constructor and Description |
---|
Result() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addLookupListener(LookupListener l)
Registers a listener that is invoked when there is a possible
change in this result.
|
Set<Class<? extends T>> |
allClasses()
Get all classes represented in the result.
|
abstract Collection<? extends T> |
allInstances()
Get all instances in the result.
|
Collection<? extends Lookup.Item<T>> |
allItems()
Get all registered items.
|
abstract void |
removeLookupListener(LookupListener l)
Unregisters a listener previously added.
|
public abstract void addLookupListener(LookupListener l)
Lookup.Result
object. When it gets garbage collected
it can no longer deliver events. Thus remember to keep reference
to the object you are attaching listener to.
l
- the listener to addpublic abstract void removeLookupListener(LookupListener l)
l
- the listener to removepublic abstract Collection<? extends T> allInstances()
List
as the order matters, but the Collection
is kept for compatibility reasons) of all instances present in
the Lookup.Result
right now that will never change its content.
ProxyLookup
may
compute the content
lazily. At least
once
such behavior resulted in a deadlock.
public Set<Class<? extends T>> allClasses()
Class
objects that will never change its contentpublic Collection<? extends Lookup.Item<T>> allItems()
IDs
, and so on.
The return value is an unmodifiable list (hence the type
should be List
as the order matters, but the Collection
is kept for compatibility reasons) of all items
present in
the Lookup.Result
right now that will never change its content.
ProxyLookup
may
compute the content
lazily.
Lookup.Item
that will never change its content