|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception org.openide.util.TopologicalSortException
Exception that signals that a topological sort failed due to unsortable nature of the graph and that provides support for reporting and recovering from that state.
Utilities.topologicalSort(java.util.Collection, java.util.Map)
,
Serialized FormMethod Summary | |
List |
partialSort()
Because the full sort was not possible, this methods returns the best possible substitute for it that is available. |
void |
printStackTrace(PrintStream s)
Adds description why the graph cannot be sorted. |
void |
printStackTrace(PrintWriter w)
Adds description why the graph cannot be sorted. |
Set[] |
topologicalSets()
As the full topological sort cannot be finished due to cycles in the graph this methods performs a partition topological sort. |
Set[] |
unsortableSets()
The topological sort could not be finished as there are some objects that are mutually refering to each other. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public final List partialSort()
public final Set[] unsortableSets()
public final void printStackTrace(PrintWriter w)
w
- writer to write topublic final void printStackTrace(PrintStream s)
s
- stream to write topublic final Set[] topologicalSets()
First of all it identifies unsortable parts of the graph and partitions the graph into sets of original objects. Each set contains objects that are mutually unsortable (there is a cycle between them). Then the topological sort is performed again on those sets, this sort succeeds because the graph of sets is DAG (all problematic edges were only between objects now grouped inside the sets) and the result forms the return value of this method.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |