All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.uni.freiburg.iig.telematik.jagal.graph.exception.NoMatchingVertexException Maven / Gradle / Ivy

Go to download

JAGAL provides implementations for directed graphs (weighted and unweighted) and various types of transition systems as well as utils for graph traversal and modification.

The newest version!
package de.uni.freiburg.iig.telematik.jagal.graph.exception;

import de.uni.freiburg.iig.telematik.jagal.graph.Edge;
import de.uni.freiburg.iig.telematik.jagal.graph.Vertex;
import de.uni.freiburg.iig.telematik.jagal.graph.abstr.AbstractGraph;

public class NoMatchingVertexException extends GraphException {

        private static final long serialVersionUID = 1L;
        private final String messagePart = "No vertex found, that contains element \"";
        private final String element;

        public , E extends Edge, U> NoMatchingVertexException(String element, AbstractGraph graph) {
                super(graph.getName());
                this.element = element;
        }

        @Override
        public String getMessage() {
                return messagePart + element + "\"";
        }

        public String getElement() {
                return element;
        }

        public enum VertexError {

                VERTEX_NOT_IN_GRAPH(" does not contain vertex "),
                NO_MATCHING_VERTEX("No matching vertex");

                private final String message;

                VertexError(String message) {
                        this.message = message;
                }

                public String message() {
                        return message;
                }

        }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy