org.refcodes.component.HandleDirectory Maven / Gradle / Ivy
package org.refcodes.component;
import java.util.Collection;
import java.util.Set;
/**
* The handle directory enables listing of all known data managed by the
* implementing component.
*
* @param The handle used by the {@link HandleDirectory}.
* @param The type of the objects to which the handles reference to.
*/
public interface HandleDirectory extends HandleLookup {
/**
* Retrieves a list of all known handles managed by the implementing
* component.
*
* @return The list of the handles known by the implementing component.
*/
Set handles();
/**
* Retrieves a list of all known objects for which there is a handle.
*
* @return The list of the objects managed by a handle.
*
* As of convenience, the type of the reference returned.
* CAUTION: The type being a sub-type of has the drawback
* that in case you specify a sub-type of (), you may end
* up with a class cast exception in case you do not make sure that
* the handle references the expected type .
*/
Collection handleReferences();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy