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

ai.stapi.graphoperations.dagtoobjectconverter.exceptions.CannotConvertDAGToObject Maven / Gradle / Ivy

There is a newer version: 0.3.2
Show newest version
package ai.stapi.graphoperations.dagtoobjectconverter.exceptions;

import ai.stapi.graph.traversableGraphElements.TraversableNode;

public class CannotConvertDAGToObject extends RuntimeException {

    private CannotConvertDAGToObject(String message) {
        super("Cannot convert DAG to Object, because " + message);
    }
    
    public static CannotConvertDAGToObject becauseItContainsCycle(TraversableNode twiceVisitedNode) {
        return new CannotConvertDAGToObject(
            String.format(
                "it contains cycle. Twice visited node: '%s/%s'",
                twiceVisitedNode.getType(),
                twiceVisitedNode.getId()
            )
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy