public final class Trace extends NamedObject implements TransitionSystem
Constructor and Description |
---|
Trace()
Creates a new, empty trace.
|
Trace(Trace orig)
Creates a new trace which is a copy of an existing one.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransition(Morphism m)
Adds a new transition to this trace which is created from a morphism.
|
void |
addTransition(Transition t)
Adds a transition to this trace.
|
ExplicitTransitionSystem |
createTransitionSystem()
Returns a ExplicitTransitionSystem consisting of the transitions
of this Trace.
|
java.util.List<Graph> |
getGraphs()
Returns the list of graphs of this trace.
|
Graph |
getInitialGraph()
Returns the first graph of the trace.
|
java.util.List<Transition> |
getTransitions()
Returns a list of all transitions in this Trace.
|
java.util.Collection<Transition> |
getTransitions(Graph source)
Returns all transitions of this trace that begin at a specific
source graph.
|
java.lang.String |
toString()
Returns a string representation of this trace.
|
getName, hasName, setName
getAttribute, setAttribute
public Trace()
public Trace(Trace orig)
orig
- the trace of which the newly created trace is a copypublic Graph getInitialGraph()
null
.getInitialGraph
in interface TransitionSystem
public java.util.List<Graph> getGraphs()
The returned list is modifiable. Changed made to the list do not reflect back into this trace, and changes made to the trace are not reflected in the returned list.
public java.util.Collection<Transition> getTransitions(Graph source)
getTransitions
in interface TransitionSystem
source
- the source graph of the returned transitionspublic java.util.List<Transition> getTransitions()
public void addTransition(Transition t)
t
- the transition which is added to this tracejava.lang.NullPointerException
- if t
is null
java.lang.IllegalArgumentException
- if the source graph of t
is different than the target
graph of the last transition of this tracepublic void addTransition(Morphism m)
m
- the morphism from which the new transition is createdpublic ExplicitTransitionSystem createTransitionSystem()
public java.lang.String toString()
toString
in class java.lang.Object