Class DirectedGraph
java.lang.Object
de.xima.fc.common.graphdot.DirectedGraph
- All Implemented Interfaces:
IGraphDotElement, IGraphDotGraph<IDirectedGraphDotStatement>, Serializable
A directed graph.
strict digraph "my-graph" {
a -> b;
}
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDirectedGraph(boolean strict, CharSequence id, List<IDirectedGraphDotStatement> statements) Creates a new directed graph. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleangetId()getType()final inthashCode()booleanisStrict()final StringCreates a string in the graph dot language representing this element.final StringtoString()voidwrite(GraphDotModelWriter writer) Writes this element to the given writer, as a string in the graph dot language representing this element.Methods inherited from interface IGraphDotElement
toGraphDotString
-
Constructor Details
-
DirectedGraph
Creates a new directed graph.- Parameters:
strict- Whether to use strict mode.id- Optional ID of the graph.statements- Statements for the graph.
-
-
Method Details
-
equals
-
getId
- Specified by:
getIdin interfaceIGraphDotGraph<S extends IGraphDotStatement>- Returns:
- Optional ID of the graph, never
nullbut may be empty.
-
getStatements
- Specified by:
getStatementsin interfaceIGraphDotGraph<S extends IGraphDotStatement>- Returns:
- Optional list of statements for the graph, never
nullbut may be empty.
-
getType
- Specified by:
getTypein interfaceIGraphDotGraph<S extends IGraphDotStatement>- Returns:
- Whether this graph is a directed or undirected graph.
-
hashCode
-
isStrict
public boolean isStrict()- Specified by:
isStrictin interfaceIGraphDotGraph<S extends IGraphDotStatement>- Returns:
- Whether this graph uses strict mode.
-
write
Description copied from interface:IGraphDotElementWrites this element to the given writer, as a string in the graph dot language representing this element.- Specified by:
writein interfaceIGraphDotElement- Parameters:
writer- Writer to write to.- Throws:
IOException- When the writer could not be written to.
-
toGraphDotString
Description copied from interface:IGraphDotElementCreates a string in the graph dot language representing this element.- Specified by:
toGraphDotStringin interfaceIGraphDotElement- Returns:
- The graph dot representation of this graph dot element.
-
toString
-