Package de.xima.fc.common.graphdot
Class DirectedGraph
- java.lang.Object
-
- de.xima.fc.common.graphdot.DirectedGraph
-
- All Implemented Interfaces:
IGraphDotElement
,IGraphDotGraph<IDirectedGraphDotStatement>
,Serializable
public final class DirectedGraph extends Object
A directed graph.strict digraph "my-graph" { a -> b; }
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DirectedGraph(boolean strict, CharSequence id, List<IDirectedGraphDotStatement> statements)
Creates a new directed graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
CharSequence
getId()
List<S>
getStatements()
EGraphType
getType()
int
hashCode()
boolean
isStrict()
String
toGraphDotString()
Creates a string in the graph dot language representing this element.String
toString()
void
write(GraphDotModelWriter writer)
Writes this element to the given writer, as a string in the graph dot language representing this element.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.common.graphdot.IGraphDotElement
toGraphDotString
-
-
-
-
Constructor Detail
-
DirectedGraph
public DirectedGraph(boolean strict, CharSequence id, List<IDirectedGraphDotStatement> statements)
Creates a new directed graph.- Parameters:
strict
- Whether to use strict mode.id
- Optional ID of the graph.statements
- Statements for the graph.
-
-
Method Detail
-
getId
public CharSequence getId()
- Specified by:
getId
in interfaceIGraphDotGraph<S extends IGraphDotStatement>
- Returns:
- Optional ID of the graph, never
null
but may be empty.
-
getStatements
public List<S> getStatements()
- Specified by:
getStatements
in interfaceIGraphDotGraph<S extends IGraphDotStatement>
- Returns:
- Optional list of statements for the graph, never
null
but may be empty.
-
getType
public EGraphType getType()
- Specified by:
getType
in interfaceIGraphDotGraph<S extends IGraphDotStatement>
- Returns:
- Whether this graph is a directed or undirected graph.
-
isStrict
public boolean isStrict()
- Specified by:
isStrict
in interfaceIGraphDotGraph<S extends IGraphDotStatement>
- Returns:
- Whether this graph uses strict mode.
-
write
public void write(GraphDotModelWriter writer) throws IOException
Description copied from interface:IGraphDotElement
Writes this element to the given writer, as a string in the graph dot language representing this element.- Specified by:
write
in interfaceIGraphDotElement
- Parameters:
writer
- Writer to write to.- Throws:
IOException
- When the writer could not be written to.
-
toGraphDotString
public final String toGraphDotString()
Description copied from interface:IGraphDotElement
Creates a string in the graph dot language representing this element.- Specified by:
toGraphDotString
in interfaceIGraphDotElement
- Returns:
- The graph dot representation of this graph dot element.
-
-