V
- is the generic type of the nodes.public class NodeCycle<V> extends Object
Modifier and Type | Field and Description |
---|---|
private SimpleValueConverter<V,String> |
formatter |
private List<V> |
inverseCycle |
private V |
startNode |
Constructor and Description |
---|
NodeCycle(V startNode)
The constructor.
|
NodeCycle(V startNode,
SimpleValueConverter<V,String> formatter)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
List<V> |
getInverseCycle()
This method gets the
List of nodes that build a cycle. |
V |
getStartNode()
This method gets the start node where the detected cycle begins.
|
String |
toString() |
private V startNode
private final SimpleValueConverter<V,String> formatter
public NodeCycle(V startNode)
startNode
- is the start-node
.public NodeCycle(V startNode, SimpleValueConverter<V,String> formatter)
startNode
- is the start-node
.formatter
- is the SimpleValueConverter
used to get a custom string-representation of the nodes. If
null
Object.toString()
is used as fallback.public List<V> getInverseCycle()
List
of nodes that build a cycle. It is stored in reverse order so the last node is
the start of the cycle from top-level. The first node will be the same node as the last one.public V getStartNode()
Copyright © 2001–2016 mmm-Team. All rights reserved.