N
- The type of Node stored in this Edgepublic class DefaultHyperEdge<N> extends java.lang.Object implements NonDirectionalEdge<N>
Constructor and Description |
---|
DefaultHyperEdge(java.util.Collection<N> nodes)
Creates a new DefaultHyperEdge connected to the Nodes in the given
Collection.
|
Modifier and Type | Method and Description |
---|---|
DefaultHyperEdge<N> |
createReplacementEdge(java.util.Collection<N> newNodes)
Creates a replacement DefaultHyperEdge for this DefaultHyperEdge, with
the replacement connected to the Nodes in the given Collection.
|
int |
getAdjacentNodeCount()
Returns the number of Nodes to which this DefaultHyperEdge is connected.
|
java.util.List<N> |
getAdjacentNodes()
Returns the List of Adjacent (connected) Nodes to this DefaultHyperEdge.
|
N |
getNodeAt(int index)
Returns the node at the given index.
|
boolean |
isAdjacentNode(N node)
Returns true if the given Node is adjacent (connected) to this
DefaultHyperEdge; false otherwise.
|
public DefaultHyperEdge(java.util.Collection<N> nodes)
nodes
- The Collection of Nodes to which this DefaultHyperEdge is
connectedpublic N getNodeAt(int index)
getNodeAt
in interface Edge<N>
index
- The index of the Node to be returnedEdge.getNodeAt(int)
public java.util.List<N> getAdjacentNodes()
getAdjacentNodes
in interface Edge<N>
Edge.getAdjacentNodes()
public boolean isAdjacentNode(N node)
isAdjacentNode
in interface Edge<N>
node
- The Node to be testedEdge.isAdjacentNode(java.lang.Object)
public int getAdjacentNodeCount()
getAdjacentNodeCount
in interface Edge<N>
Edge.getAdjacentNodeCount()
public DefaultHyperEdge<N> createReplacementEdge(java.util.Collection<N> newNodes)
createReplacementEdge
in interface NonDirectionalEdge<N>
newNodes
- The collection of Nodes to which the replacement Edge will be
connectedNonDirectionalEdge.createReplacementEdge(java.util.Collection)