Package main
Class Network
- java.lang.Object
-
- main.Network
-
public class Network extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Network.UndefinedIdentifier
-
Field Summary
Fields Modifier and Type Field Description static int
ArcCleaner
static int
ArcEntering
static int
ArcOutering
static int
ArcZero
-
Constructor Summary
Constructors Constructor Description Network()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArc(Transition transition, Place place, int value, int identifier)
create a new arcvoid
addPlace(int value)
create a new placevoid
addTransition()
create a new transitionvoid
deleteArc(Arc a)
delete an arcvoid
deletePlace(Place place)
delete a place an the arcs link to itvoid
deleteTransition(Transition transition)
delete a transitionvoid
fire(Transition transition)
fire the transition selectedjava.util.List<Transition>
getListTransition()
java.util.List<Place>
getPlaceList()
static void
main(java.lang.String[] args)
java.lang.String
toString()
string representation of a network
-
-
-
Method Detail
-
addTransition
public void addTransition()
create a new transition
-
addPlace
public void addPlace(int value) throws Place.UndefinedToken
create a new place- Throws:
Place.UndefinedToken
-
addArc
public void addArc(Transition transition, Place place, int value, int identifier) throws Network.UndefinedIdentifier
create a new arc- Parameters:
transtion
- the transition link to this arcplace
- the place link to this arcthe
- value of this arcidentifier
- the integer that correspond to the type of arc (define as static)- Throws:
Network.UndefinedIdentifier
-
deleteArc
public void deleteArc(Arc a)
delete an arc
-
deletePlace
public void deletePlace(Place place)
delete a place an the arcs link to it
-
deleteTransition
public void deleteTransition(Transition transition)
delete a transition
-
fire
public void fire(Transition transition)
fire the transition selected
-
toString
public java.lang.String toString()
string representation of a network- Overrides:
toString
in classjava.lang.Object
-
main
public static void main(java.lang.String[] args) throws Place.UndefinedToken, Network.UndefinedIdentifier
-
getPlaceList
public java.util.List<Place> getPlaceList()
-
getListTransition
public java.util.List<Transition> getListTransition()
-
-