org.processmining.framework.log.classic
Class AuditTrailEntriesClassic

java.lang.Object
  extended by org.processmining.framework.log.classic.AuditTrailEntriesClassic
All Implemented Interfaces:
java.lang.Cloneable, AuditTrailEntries

public class AuditTrailEntriesClassic
extends java.lang.Object
implements AuditTrailEntries

A list of AuditTrailEntry objects connected to an iterator in order to walk through them. This usually corresponds to one audit trail, or trace, in the log (that is, an ordered sequence of activities that took place for one process instance.

Author:
Peter van den Brand

Constructor Summary
AuditTrailEntriesClassic()
          Constructor for an empty list of audit trail entries.
AuditTrailEntriesClassic(java.util.ArrayList entries)
          Constructor for a given initial list of audit trail entries.
 
Method Summary
 void add(AuditTrailEntry ate)
          Adds an audit trail entry to the end of the list.
 void add(AuditTrailEntry ate, int pos)
          Adds an audit trail entry to the given position in the list.
 java.lang.Object clone()
          Makes a deep copy of this object.
 AuditTrailEntries cloneIteratorOnly()
          Makes a shallow copy of this object.
 AuditTrailEntry first()
          Gets the first element out of the list of audit trail entries.
 AuditTrailEntry getEntry(int n)
          Retrieves an audit trail entry based on the given position in the list.
 boolean hasNext()
          Iterator-style access method.
 AuditTrailEntry last()
          Gets the last element out of the list of audit trail entries.
 AuditTrailEntry next()
          Iterator-style access method.
 void remove()
          Iterator-style access method.
 void reset()
          Iterator-style access method.
 int size()
          Determines the number of audit trail entries stored in the list.
 java.util.ArrayList toArrayList()
          Returns the list of audit trail entries.
 java.lang.String toString()
          Retrieves the list of audit trail entries as a string.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuditTrailEntriesClassic

public AuditTrailEntriesClassic()
Constructor for an empty list of audit trail entries.


AuditTrailEntriesClassic

public AuditTrailEntriesClassic(java.util.ArrayList entries)
Constructor for a given initial list of audit trail entries.

Parameters:
entries - the initial list of entries
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: AuditTrailEntries
Iterator-style access method.

Determines whether there is another audit trail entry left. (This relates to the built-in iterator walking through the elements.)

Specified by:
hasNext in interface AuditTrailEntries
Returns:
true if there is at least one audit trail entry left, false otherwise.
See Also:
next

next

public AuditTrailEntry next()
Description copied from interface: AuditTrailEntries
Iterator-style access method.

Retrieves the next audit trail entry from the list. (This relates to the built-in iterator walking through the elements and implies moving it one poksition further.) Before calling this method one should call hasNext in order to determine whether there is onother element left.

Specified by:
next in interface AuditTrailEntries
Returns:
the next AuditTrailEntry from the list

reset

public void reset()
Description copied from interface: AuditTrailEntries
Iterator-style access method.

Resets the built-in iterator to the first element of the list.

Specified by:
reset in interface AuditTrailEntries

remove

public void remove()
Description copied from interface: AuditTrailEntries
Iterator-style access method.

Remove the entry that was returned by the last call to next().

Specified by:
remove in interface AuditTrailEntries

add

public void add(AuditTrailEntry ate)
Description copied from interface: AuditTrailEntries
Adds an audit trail entry to the end of the list.

Specified by:
add in interface AuditTrailEntries
Parameters:
ate - the entry to add

add

public void add(AuditTrailEntry ate,
                int pos)
Description copied from interface: AuditTrailEntries
Adds an audit trail entry to the given position in the list.

Specified by:
add in interface AuditTrailEntries
Parameters:
ate - the entry to add
pos - the position of the entry

toArrayList

public java.util.ArrayList toArrayList()
Description copied from interface: AuditTrailEntries
Returns the list of audit trail entries.

WARNING: The usage contract for this interface determines, that any changes that you make for the returned array list will not be persistent to both this instance and the potentially wrapped higher-level classes! Use dedicated modification methods for this purpose!

Specified by:
toArrayList in interface AuditTrailEntries
Returns:
the list of audit trail entries as an ArrayList

first

public AuditTrailEntry first()
Description copied from interface: AuditTrailEntries
Gets the first element out of the list of audit trail entries.

Specified by:
first in interface AuditTrailEntries
Returns:
the first AuditTrailEntry from the list

last

public AuditTrailEntry last()
Description copied from interface: AuditTrailEntries
Gets the last element out of the list of audit trail entries.

Specified by:
last in interface AuditTrailEntries
Returns:
the last AuditTrailEntry from the list

getEntry

public AuditTrailEntry getEntry(int n)
Description copied from interface: AuditTrailEntries
Retrieves an audit trail entry based on the given position in the list.

Specified by:
getEntry in interface AuditTrailEntries
Parameters:
n - the index position in the list (starting with 0)
Returns:
the AuditTrailEntry stored at the given position

toString

public java.lang.String toString()
Description copied from interface: AuditTrailEntries
Retrieves the list of audit trail entries as a string.

Specified by:
toString in interface AuditTrailEntries
Overrides:
toString in class java.lang.Object
Returns:
all entries as a String

size

public int size()
Description copied from interface: AuditTrailEntries
Determines the number of audit trail entries stored in the list.

Specified by:
size in interface AuditTrailEntries
Returns:
the number of audit trail entries

cloneIteratorOnly

public AuditTrailEntries cloneIteratorOnly()
Description copied from interface: AuditTrailEntries
Makes a shallow copy of this object. This means that the contained list of AuditTrailEntry elements will be not cloned. However, the iterator is duplicated in its current positon.

Specified by:
cloneIteratorOnly in interface AuditTrailEntries
Returns:
the cloned object

clone

public java.lang.Object clone()
Description copied from interface: AuditTrailEntries
Makes a deep copy of this object. This means that both the contained list of AuditTrailEntry elements and the iterator in its current positon will be duplicated. Overrides clone.

Specified by:
clone in interface AuditTrailEntries
Overrides:
clone in class java.lang.Object
Returns:
the cloned object