|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.text.math.DirEdgeFormatV1<N>
N
- the node type.public final class DirEdgeFormatV1<N>
This class is a concrete implementation of DirEdgeFormat.
The syntax used by this format is: Source_Node -> Sink_Node
.
Whitespace surrounding the arrow is optional.
Constructor Summary | |
---|---|
DirEdgeFormatV1(SimpleFormat<N> nodeFormat)
Constructs a new directed edge format. |
Method Summary | |
---|---|
java.lang.String |
format(DirectedGraph.Edge<N> edge)
Returns a formatted string representation of the provided edge. |
static DirEdgeFormatV1<java.lang.String> |
getBasic()
Returns a DirEdgeFormatV1 that does not
format or parse the nodes of the edges supplied to it. |
DirectedGraph.Edge<N> |
parse(java.lang.String edge)
Parses the provided string and returns its corresponding directed edge. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface sbrt.shell.text.Formatter |
---|
format |
Constructor Detail |
---|
public DirEdgeFormatV1(SimpleFormat<N> nodeFormat)
nodeFormat
- the format to use for nodes.Method Detail |
---|
public static DirEdgeFormatV1<java.lang.String> getBasic()
DirEdgeFormatV1
that does not
format or parse the nodes of the edges supplied to it. In other
words, it returns a DirEdgeFormatV1
with
the most basic possible functionality. Empty strings are not
allowed however.
DirEdgeFormatV1
that does not
format or parse the nodes of the edges supplied to it.public java.lang.String format(DirectedGraph.Edge<N> edge)
edge
- the edge to be formatted.
public DirectedGraph.Edge<N> parse(java.lang.String edge)
parse
in interface Parser<DirectedGraph.Edge<N>>
edge
- the string to be parsed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |