org.processmining.framework.models.petrinet
Class TransitionCluster

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by org.processmining.framework.models.petrinet.TransitionCluster
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class TransitionCluster
extends java.util.ArrayList

A transition cluster is a group of transitions in a Petri net that are grouped together. For example, the makeClusters procedure groups transitions belonging to the same activity but to different log event types (such as Start, Schedule, Complete). The cluster will be visualized by drawing a blue box around the group of transitions.

Note that the transition contained in the cluster must be also contained in the transition list of the Petri net. The grouping is considered to be additional information based on that set of transitions.

Author:
not attributable
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
TransitionCluster(java.lang.String label)
          Default constructor.
TransitionCluster(TransitionCluster copyTemplate)
          Copy constructor initializing the transition cluster based on the given template cluster.
 
Method Summary
 boolean addTransition(Transition t)
          Adds a transition to this cluster.
 java.lang.Object clone()
          Makes a deep copy of the object.
 java.lang.String getLabel()
          Gets the name of the transition cluster.
 Transition getTransition(int i)
          Gets a transition from the cluster based on the given index.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

TransitionCluster

public TransitionCluster(java.lang.String label)
Default constructor.

Parameters:
label - the name of the cluster

TransitionCluster

public TransitionCluster(TransitionCluster copyTemplate)
Copy constructor initializing the transition cluster based on the given template cluster. Note that referenced Transitions are not cloned themselves (not a deep copy).

Parameters:
copyTemplate - the given cluster serving as a template for this object
Method Detail

addTransition

public boolean addTransition(Transition t)
Adds a transition to this cluster.

Parameters:
t - the transition to be added
Returns:
true if the transition is not contained yet, and the transition could be added. False otherwise

getTransition

public Transition getTransition(int i)
Gets a transition from the cluster based on the given index.

Parameters:
i - the index
Returns:
the transition that resides in the cluster at that index

getLabel

public java.lang.String getLabel()
Gets the name of the transition cluster.

Returns:
the name of the cluster

clone

public java.lang.Object clone()
Makes a deep copy of the object. Note that this method needs to be extended as soon as there are attributes added to the class which are not primitive or immutable.
Note further that the referenced transitions are not cloned themselves, so in that sense it is a shallow copy. This is needed to, e.g., re-establish the structure of a PetriNet.

Overrides:
clone in class java.util.ArrayList
Returns:
Object the cloned object