K - type of key (usually identifier) of the sorted itemV - type of sorted itempublic interface TopoNode<K,V>
| Modifier and Type | Method and Description |
|---|---|
Set<K> |
getRemainingTopoDependencies()
Obtains a set of keys that represent prerequisite items that this
item depends on.
|
K |
getTopoKey()
Obtains the key of sorted item represented by this node.
|
V |
getValue()
Obtains the sorted item that is represented by this node.
|
K getTopoKey()
V getValue()
Set<K> getRemainingTopoDependencies()
Provided that the sorted item represented by this
node depends on nodes A, B, C, that have
their respective keys Ak, Bk, Ck, this
method initially returs a set of (Ak, Bk, Ck).
During processing of topological sorting algorithm, the returned set will be modified; unless a cycle is detected, at the end of the algorithm this set will be empty.
Notice that the returned set must be mutable. This implies
that an instance of TopoNode may not be used in two invocations
of topological sorting.
Copyright © 2014 Boleslav Bobcik - Auderis. All rights reserved.