Package de.xima.fc.common.graphdot
Class DirectedSubGraphExpression
- java.lang.Object
-
- de.xima.fc.common.graphdot.DirectedSubGraphExpression
-
- All Implemented Interfaces:
IGraphDotEdgeSpecifier<IDirectedGraphDotStatement>
,IGraphDotElement
,IGraphDotSubGraphExpression<IDirectedGraphDotStatement>
,Serializable
public final class DirectedSubGraphExpression extends Object
A sub graph expression with directed edges.subgraph "my-graph" { foo -> bar; }
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DirectedSubGraphExpression(CharSequence id, List<IDirectedGraphDotStatement> statements)
Creates a new sub graph with directed edges.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
CharSequence
getId()
List<S>
getStatements()
int
hashCode()
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
-
DirectedSubGraphExpression
public DirectedSubGraphExpression(CharSequence id, List<IDirectedGraphDotStatement> statements)
Creates a new sub graph with directed edges.- Parameters:
id
- Optional ID.statements
- Optional statement of the sub graph.
-
-
Method Detail
-
getId
public final CharSequence getId()
- Specified by:
getId
in interfaceIGraphDotSubGraphExpression<S extends IGraphDotStatement>
- Returns:
- The optional ID of this sub graph. Never
null
, but might be empty.
-
getStatements
public final List<S> getStatements()
- Specified by:
getStatements
in interfaceIGraphDotSubGraphExpression<S extends IGraphDotStatement>
- Returns:
- A list of statements contained in this sub graph. Never
null
, but might be empty.
-
write
public final 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.
-
-