Package org.deckfour.xes.classification
Class XEventClass
- java.lang.Object
-
- org.deckfour.xes.classification.XEventClass
-
- All Implemented Interfaces:
java.lang.Comparable<XEventClass>
public class XEventClass extends java.lang.Object implements java.lang.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)
-
-
Constructor Summary
Constructors Constructor Description XEventClass(java.lang.String id, int index)Creates a new event class instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(XEventClass o)booleanequals(java.lang.Object o)java.lang.StringgetId()Retrieves the name, i.e.intgetIndex()Returns the index of this event class.inthashCode()voidincrementSize()Increments the size of this class by one, i.e.voidsetSize(int size)Sets the size of this event class, i.e.intsize()Retrieves the size, i.e.java.lang.StringtoString()
-
-
-
Method Detail
-
getId
public java.lang.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(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(XEventClass o)
- Specified by:
compareToin interfacejava.lang.Comparable<XEventClass>
-
-