org.graffiti.util
Interface MultiLinkable<Element,LinkType>

Type Parameters:
Element - The type of the elements contained in the list.
LinkType - The class (typically an enum) that is used to specify which list to use if the element is contained in more than one MultiLinkedList.
All Known Implementing Classes:
FastEdge, FastNode

public interface MultiLinkable<Element,LinkType>

Interface that must be implemented by classes that are to be stored in a MultiLinkedList. For efficient access of the MultiLinkNode that corresponds to a list element (this is needed for instance in the MultiLinkedList.remove(Object) method), each list element must store a pointer to the respective node. Access to this pointer is by the getLinkNode(Object) and setLinkNode(Object, MultiLinkNode) methods.

Version:
$Revision: 5767 $ $Date: 2006-01-13 12:21:25 +0100 (Fr, 13 Jan 2006) $
Author:
Michael Forster

Method Summary
 MultiLinkNode<Element> getLinkNode(LinkType linkType)
          Returns the link node corresponding to the list identified by the given link type.
 void setLinkNode(LinkType linkType, MultiLinkNode<Element> linkNode)
          Sets the link node corresponding to the list identified by the given link type.
 

Method Detail

getLinkNode

MultiLinkNode<Element> getLinkNode(LinkType linkType)
Returns the link node corresponding to the list identified by the given link type.

Parameters:
linkType - Identification of the respective list.
Returns:
The corresponding link node.

setLinkNode

void setLinkNode(LinkType linkType,
                 MultiLinkNode<Element> linkNode)
Sets the link node corresponding to the list identified by the given link type.

Parameters:
linkType - Identification of the respective list.
linkNode - The corresponding link node.


Generated at 2012-05-30 11:00:14 PM CEST