vanted.petrinetelements
Class AbstractArc

java.lang.Object
  extended by vanted.petrinetelements.AbstractArc
Direct Known Subclasses:
InArc, OutArc

public abstract class AbstractArc
extends java.lang.Object

The Class AbstractArc is the abstract class for arc handling.

Author:
Kevin Pucknat

Constructor Summary
AbstractArc(org.graffiti.graph.Edge edge)
          Instantiates a new abstract arc.
AbstractArc(Place place, Transition transition, org.graffiti.graph.Edge edge)
          Instantiates a new abstract arc.
AbstractArc(Transition transition, Place place, org.graffiti.graph.Edge edge)
          Instantiates a new abstract arc.
 
Method Summary
 void addArcWeight(ArcWeight arcWeight)
          Adds the object ArcWeight to the ArcWeightAttribute.
 void addDraw(DrawingEdge draw)
          Adds the object DrawingEdge to the DrawingEdgeAttribute.
 void addExpression(Expression expression)
          Adds the expression.
 ArcWeight getArcWeight()
          Gets the object ArcWeight which contains an object with the arc-weight.
 DrawingEdge getDraw()
          Gets the object DrawingEdge which contains a String with a label.
 org.graffiti.graph.Edge getEdge()
          Gets the edge.
 java.util.List<org.graffiti.graph.Edge> getEdges()
          Gets the edges.
 java.util.List<Expression> getExpressions()
          Gets the expressions.
 long getID()
          Gets the iD.
 Place getPlace()
          Gets the place.
 Transition getTransition()
          Gets the transition.
 int hashCode()
           
 void removeAllExpressions()
          Removes all the expressions.
 void removeArcWeight()
          Removes the object ArcWeight which contains an object with the arc-weight and the ArcWeightAttribute.
 void removeDraw()
          Removes the object DrawingEdge which contains a String with a label and the DrawingEdgeAttribute.
 void removeExpression(Expression expression)
          Removes the expression.
 void setEdge(org.graffiti.graph.Edge edge)
          Sets the edge.
 void setPlace(Place place)
          Sets the place.
 void setTransition(Transition transition)
          Sets the transition.
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractArc

public AbstractArc(org.graffiti.graph.Edge edge)
Instantiates a new abstract arc.

Parameters:
edge - the edge

AbstractArc

public AbstractArc(Place place,
                   Transition transition,
                   org.graffiti.graph.Edge edge)
Instantiates a new abstract arc.

Parameters:
place - the place
transition - the transition
edge - the edge

AbstractArc

public AbstractArc(Transition transition,
                   Place place,
                   org.graffiti.graph.Edge edge)
Instantiates a new abstract arc.

Parameters:
transition - the transition
place - the place
edge - the edge
Method Detail

getID

public long getID()
Gets the iD.

Returns:
the iD

getPlace

public Place getPlace()
Gets the place.

Returns:
the place

getTransition

public Transition getTransition()
Gets the transition.

Returns:
the transition

setTransition

public void setTransition(Transition transition)
Sets the transition.

Parameters:
transition - the new transition

setPlace

public void setPlace(Place place)
Sets the place.

Parameters:
place - the new place

getEdge

public org.graffiti.graph.Edge getEdge()
Gets the edge.

Returns:
the edge

getEdges

public java.util.List<org.graffiti.graph.Edge> getEdges()
Gets the edges.

Returns:
the edges

setEdge

public void setEdge(org.graffiti.graph.Edge edge)
Sets the edge.

Parameters:
edge - the new edge

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

addExpression

public void addExpression(Expression expression)
Adds the expression.

Parameters:
expression - the expression

removeExpression

public void removeExpression(Expression expression)
Removes the expression.

Parameters:
expression - the expression

removeAllExpressions

public void removeAllExpressions()
Removes all the expressions.


getExpressions

public java.util.List<Expression> getExpressions()
Gets the expressions.

Returns:
the expressions

addArcWeight

public void addArcWeight(ArcWeight arcWeight)
Adds the object ArcWeight to the ArcWeightAttribute.

Parameters:
arcWeight - the arc weight

removeArcWeight

public void removeArcWeight()
Removes the object ArcWeight which contains an object with the arc-weight and the ArcWeightAttribute.


getArcWeight

public ArcWeight getArcWeight()
Gets the object ArcWeight which contains an object with the arc-weight.

Returns:
the arc weight

addDraw

public void addDraw(DrawingEdge draw)
Adds the object DrawingEdge to the DrawingEdgeAttribute.

Parameters:
draw - the draw

removeDraw

public void removeDraw()
Removes the object DrawingEdge which contains a String with a label and the DrawingEdgeAttribute.


getDraw

public DrawingEdge getDraw()
Gets the object DrawingEdge which contains a String with a label.

Returns:
the draw