org.deckfour.xes.classification
Class XEventClass

java.lang.Object
  extended by org.deckfour.xes.classification.XEventClass
All Implemented Interfaces:
Comparable<XEventClass>

public class XEventClass
extends Object
implements Comparable<XEventClass>

Implements an event class. An event class is an identity for events, making them comparable. If two events are part of the same class, they are considered to be equal, i.e. to be referring to the same higher-level concept.

Author:
Christian W. Guenther (christian@deckfour.org)

Field Summary
protected  String id
          Unique identification string of class.
protected  int index
          Unique index of class.
protected  int size
          Size of class, i.e.
 
Constructor Summary
XEventClass(String id, int index)
          Creates a new event class instance.
 
Method Summary
 int compareTo(XEventClass o)
           
 boolean equals(Object o)
           
 String getId()
          Retrieves the name, i.e.
 int getIndex()
          Returns the index of this event class.
 int hashCode()
           
 void incrementSize()
          Increments the size of this class by one, i.e.
 void setSize(int size)
          Sets the size of this event class, i.e.
 int size()
          Retrieves the size, i.e.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

index

protected int index
Unique index of class.


id

protected String id
Unique identification string of class.


size

protected int size
Size of class, i.e. number of represented instances.

Constructor Detail

XEventClass

public XEventClass(String id,
                   int index)
Creates a new event class instance.

Parameters:
id - Unique identification string of the class, i.e. its name.
index - Unique index of this event class.
Method Detail

getId

public String getId()
Retrieves the name, i.e. unique identification string, of this event class.

Returns:
The name of this class, as a unique string.

getIndex

public int getIndex()
Returns the index of this event class.

Returns:
Unique index.

size

public int size()
Retrieves the size, i.e. the number of events represented by this event class.

Returns:
Size of this class.

setSize

public void setSize(int size)
Sets the size of this event class, i.e. the number of represented instances.

Parameters:
size - Number of events in this class.

incrementSize

public void incrementSize()
Increments the size of this class by one, i.e. adds another event to the number of represented instances.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(XEventClass o)
Specified by:
compareTo in interface Comparable<XEventClass>