vanted.petrinetelements.misc
Enum PetriNetType

java.lang.Object
  extended by java.lang.Enum<PetriNetType>
      extended by vanted.petrinetelements.misc.PetriNetType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PetriNetType>

public enum PetriNetType
extends java.lang.Enum<PetriNetType>

The Enum PetriNetType.


Enum Constant Summary
CONTINUOUS
          The CONTINUOUS Petri net type.
DISCRETE
          The DISCRETE Petri net type.
EMPTY
          The EMPTY Petri net type.
HYBRID
          The HYBRID Petri net type.
OBJECT
          The OBJECT Petri net type.
 
Method Summary
static PetriNetType fromName(java.lang.String name)
           
 java.lang.String getName()
           
static PetriNetType getTokenType(java.util.List<Place> places)
          Gets the type of a token.
static PetriNetType getType(java.util.List<Place> places)
          Gets the type of a Petri net from the places.
static PetriNetType getType2(org.graffiti.graph.Graph graph)
          Gets the type from a graph.
static PetriNetType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PetriNetType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DISCRETE

public static final PetriNetType DISCRETE
The DISCRETE Petri net type.


CONTINUOUS

public static final PetriNetType CONTINUOUS
The CONTINUOUS Petri net type.


HYBRID

public static final PetriNetType HYBRID
The HYBRID Petri net type.


OBJECT

public static final PetriNetType OBJECT
The OBJECT Petri net type.


EMPTY

public static final PetriNetType EMPTY
The EMPTY Petri net type.

Method Detail

values

public static PetriNetType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PetriNetType c : PetriNetType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PetriNetType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getName

public java.lang.String getName()

fromName

public static PetriNetType fromName(java.lang.String name)

getTokenType

public static PetriNetType getTokenType(java.util.List<Place> places)
Gets the type of a token.

Parameters:
places - the places
Returns:
the Petri net type

getType

public static PetriNetType getType(java.util.List<Place> places)
Gets the type of a Petri net from the places. Checks the tokens, capacities and arc-weights.

Parameters:
places - the places
Returns:
the Petri net type

getType2

public static PetriNetType getType2(org.graffiti.graph.Graph graph)
Gets the type from a graph. Checks the tokens, capacities and arc-weights.

Parameters:
graph - the graph
Returns:
the Petri net type