Interface IMLog
-
- All Superinterfaces:
java.lang.Cloneable,java.lang.Iterable<IMTrace>
- All Known Implementing Classes:
IMLogImpl,IMLogImplPartialTraces
public interface IMLog extends java.lang.Iterable<IMTrace>, java.lang.Cloneable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intaddActivity(java.lang.String activityName)Add an activity (if it was not yet added yet).IMLogclone()java.lang.String[]getActivities()java.lang.StringgetActivity(int index)intgetNumberOfActivities()IMTraceIteratoriterator()Do not mix iterators when removing events.voidremoveEvent(int traceIndex, int eventIndex)voidremoveTrace(int traceIndex)intsize()intsplitTrace(int traceIndex, int eventIndex)Split a trace: add a new trace at the start of the log, containing all events up till (excluding) eventIndex.
-
-
-
Method Detail
-
size
int size()
- Returns:
- The number of traces in the log.
-
iterator
IMTraceIterator iterator()
Do not mix iterators when removing events.- Specified by:
iteratorin interfacejava.lang.Iterable<IMTrace>
-
getNumberOfActivities
int getNumberOfActivities()
-
getActivity
java.lang.String getActivity(int index)
-
getActivities
java.lang.String[] getActivities()
-
addActivity
int addActivity(java.lang.String activityName)
Add an activity (if it was not yet added yet).- Parameters:
activityName-- Returns:
- the (possibly new) index of the activity.
-
clone
IMLog clone()
- Returns:
- a completely independent copy. This is the only method that should be used in log splitting, such that extra information can be preserved by the log implementation.
-
removeTrace
void removeTrace(int traceIndex)
-
removeEvent
void removeEvent(int traceIndex, int eventIndex)
-
splitTrace
int splitTrace(int traceIndex, int eventIndex)Split a trace: add a new trace at the start of the log, containing all events up till (excluding) eventIndex. Furthermore, remove all events up to (excluding) eventIndex from the trace at traceIndex.- Parameters:
traceIndex-eventIndex-- Returns:
- the index of the inserted trace
-
-