-
- Type Parameters:
H
- The handle used by theHandleDirectory
.REF
- The type of the objects to which the handles reference to.
- All Superinterfaces:
HandleLookup<H,REF>
public interface HandleDirectory<H,REF> extends HandleLookup<H,REF>
The handle directory enables listing of all known data managed by the implementing component.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends REF>
Collection<T>handleReferences()
Retrieves a list of all known objects for which there is a handle.Set<H>
handles()
Retrieves a list of all known handles managed by the implementing component.-
Methods inherited from interface org.refcodes.component.HandleLookup
hasHandle, lookupHandle, removeHandle
-
-
-
-
Method Detail
-
handles
Set<H> handles()
Retrieves a list of all known handles managed by the implementing component.- Returns:
- The list of the handles known by the implementing component.
-
handleReferences
<T extends REF> Collection<T> handleReferences()
Retrieves a list of all known objects for which there is a handle.- Type Parameters:
T
- As of convenience, the type of the reference returned. CAUTION: The typeT
being a sub-type ofREF
has the drawback that in case you specify a sub-type ofREF
(T
), you may end up with a class cast exception in case you do not make sure that the handle references the expected typeT
.- Returns:
- The list of the objects managed by a handle.
-
-