package graph; import java.util.Comparator; // Exception, das User nach einem ungültigen Knoten sucht class NameDoesNotExistException extends Exception { public NameDoesNotExistException() { super(); } public NameDoesNotExistException(String message) { super(message); } public NameDoesNotExistException(String message, Throwable cause) { super(message, cause); } public NameDoesNotExistException(Throwable cause) { super(cause); } } // Element in der PriorityQueue class WrapperElement { // ATTRIBUTE private MarkedVertex n1; private int prio; // KONSTRUKTOR public WrapperElement(MarkedVertex n1, int prio) { this.n1 = n1; this.prio = prio; } // GET-ER public MarkedVertex getElement() { return this.n1; } public int getPrio() { return this.prio; } } // 2 Elemente in der PriorityQueue Vergleichen class WrapperComparator implements Comparator> { public int compare(WrapperElement element1, WrapperElement element2) { return Integer.compare(element1.getPrio(), element2.getPrio()); } }