|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
N
- the graph node, which must implement the interface IBasicNode
.E
- the graph edge, which must implement the interface IBasicEdge
.public interface INodeColourHandler<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
Implementers of this interface will provide a handler class for an object that provides the colour
to a node. The colour being one or more properties that are associated with the graph node.
The handler facilitates the storage of the colour and can be copied and perform the copying of the
colour object itself. The handler is required because a colour can be of any type and each node in a graph
can potentially have a different colour type. Implementers of this interface provides a mechanism handle
diverse colour object types. Another important issue handles here is the copy of a nodes colour when the node
is copied. Depending of the usage of the graph or node, the colour value may or may not be copied. The decision
to copy can be application dependent and so the supplier of the implementation of this interface can use the
copyObject(newNode)
method to control this behaviour. The newNode
parameter provides
the method with information about the node to be copied to and as a consequence the graph it belongs to and
it;s topology. Any of these may be important in deciding if or how to copy the colour value.
Method Summary | |
---|---|
java.lang.Object |
copyColour(N newNode)
Copy the colour object. |
INodeColourHandler<N,E> |
createCopy()
Create a copy of this colour handler. |
java.lang.Object |
getColour()
Get the colour value. |
N |
getNode()
Gets the node that ones this colour handler. |
void |
setColour(java.lang.Object colour)
Set the colour value. |
void |
setNode(N node)
Sets the node that will own this handler and the associated colour value. |
Method Detail |
---|
void setColour(java.lang.Object colour)
colour
- The colour value to set.java.lang.Object getColour()
INodeColourHandler<N,E> createCopy()
java.lang.Object copyColour(N newNode)
newNode
- The new node the colour will be copied to.
void setNode(N node)
node
- The node that will own this instance. Can be null.N getNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |