public class NegativeCycleDetectedException extends RuntimeException
Constructor and Description |
---|
NegativeCycleDetectedException()
Constructs a new exception with
null as its detail message. |
NegativeCycleDetectedException(String message)
Constructs a new exception with the specified detail message.
|
NegativeCycleDetectedException(String message,
GraphPath<?,?> cycle)
Constructs a new exception with the specified detail message.
|
Modifier and Type | Method and Description |
---|---|
GraphPath<?,?> |
getCycle()
Get the actual negative cycle, or null if not provided.
|
void |
setCycle(GraphPath<?,?> cycle)
Set the negative cycle.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public NegativeCycleDetectedException()
null
as its detail message. The cause is not
initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable)
.public NegativeCycleDetectedException(String message)
Throwable.initCause(java.lang.Throwable)
.message
- the detail message. The detail message is saved for later retrieval by the
Throwable.getMessage()
method.public NegativeCycleDetectedException(String message, GraphPath<?,?> cycle)
Throwable.initCause(java.lang.Throwable)
.message
- the detail message. The detail message is saved for later retrieval by the
Throwable.getMessage()
method.cycle
- the negative weight cycleCopyright © 2019. All rights reserved.