Class GraphCycleException

  • All Implemented Interfaces:
    java.io.Serializable

    public class GraphCycleException
    extends java.lang.IllegalArgumentException
    An exception thrown when an algorithm that operates on a graph fails because the graph contains a cycle.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphCycleException​(java.lang.String message, java.util.Collection<?> culprits)
      Creates a new exception for a detected cycle in a graph.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<?> getCycleMembers()
      Returns a collection of the objects involved in the cycle, as passed to the constructor.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GraphCycleException

        public GraphCycleException​(java.lang.String message,
                                   java.util.Collection<?> culprits)
        Creates a new exception for a detected cycle in a graph.
        Parameters:
        message - the detail message to associate with the cycle
        culprits - the objects involved in the cycle
    • Method Detail

      • getCycleMembers

        public java.util.Collection<?> getCycleMembers()
        Returns a collection of the objects involved in the cycle, as passed to the constructor.
        Returns:
        the culprits that were passed to the constructor