public class Transition extends AttributeObject
Constructor and Description |
---|
Transition(Morphism morphism)
Creates a new transition.
|
Transition(Morphism morphism,
Morphism match,
Rule rule)
Creates a new transition which is labeled by a rule.
|
Transition(Morphism morphism,
java.lang.String customLabel)
Creates a new transition which is labeled by a custom label.
|
Transition(Transition orig)
Creates a new transition which is a copy of another transition.
|
Modifier and Type | Method and Description |
---|---|
Transition |
changeCoordinates(Morphism srcIso,
Morphism tgtIso)
Creates a new transition which is the same as this transition except
that the source and target are changed to isomorphic graphs.
|
Transition |
changeSource(Morphism iso)
Creates a new transition which is the same as this transition except
that the source is changed to an isomorphic graph.
|
Transition |
changeTarget(Morphism iso)
Creates a new transition which is the same as this transition except
that the target is changed to an isomorphic graph.
|
java.lang.String |
getCustomLabel()
Returns the custom label of this transition.
|
java.lang.String |
getLabel()
Returns the label of this transition.
|
Morphism |
getMatch()
Returns the match of this transition.
|
Morphism |
getMorphism()
Returns the morphism of this transition.
|
Rule |
getRule()
Returns the rule of this transition.
|
Graph |
getSource()
Returns the source graph of this transition.
|
Graph |
getTarget()
Returns the target graph of this transition.
|
int |
getWeight()
Returns the weight of this transition.
|
void |
setCustomLabel(java.lang.String customLabel)
Sets the custom label of this transition.
|
void |
setMatch(Morphism match)
Sets the match of this transition.
|
void |
setRule(Rule rule)
Sets the rule of this transition.
|
void |
setWeight(int weight)
Sets the weight of this transition.
|
getAttribute, setAttribute
public Transition(Morphism morphism)
java.lang.NullPointerException
- if morphism
is null
public Transition(Morphism morphism, Morphism match, Rule rule)
java.lang.NullPointerException
- if morphism
is null
public Transition(Morphism morphism, java.lang.String customLabel)
java.lang.NullPointerException
- if morphism
is null
public Transition(Transition orig)
public Rule getRule()
null
if this transition
does not have a rulepublic void setRule(Rule rule)
null
.rule
- the new rule of this transitionpublic Morphism getMatch()
null
if this transition
does not have a rule or the match is not specifiedpublic void setMatch(Morphism match)
match
- the new match of this transitionjava.lang.IllegalStateException
- if the transition does not have a rule or the match is not a
morphism from the rule's left-hand side to the transition's source
graphpublic java.lang.String getCustomLabel()
null
if this
transition does not have a custom labelpublic void setCustomLabel(java.lang.String customLabel)
customLabel == null
,
the custom label of this transition is removed.public void setWeight(int weight)
public int getWeight()
public Morphism getMorphism()
public Graph getSource()
public Graph getTarget()
public java.lang.String getLabel()
null
.null
if it doesn't have
a labelpublic Transition changeSource(Morphism iso)
iso
- isomorphismjava.lang.IllegalArgumentException
- if the domain of iso
is not this transition's source,
or if iso
is not an isomorphismpublic Transition changeTarget(Morphism iso)
iso
- isomorphismjava.lang.IllegalArgumentException
- if the domain of iso
is not this transition's target,
or if iso
is not an isomorphismpublic Transition changeCoordinates(Morphism srcIso, Morphism tgtIso)
srcIso
- isomorphism with this transition's source as domaintgtIso
- isomorphism with this transition's target as domainjava.lang.IllegalArgumentException
- if srcIso
is no isomorphism with this transition's source
as domain, or tgtIso
is no isomorphism with this
transitions target as domain.