Package org.deckfour.xes.model.impl
Class XTraceImpl
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<XEvent>
-
- org.deckfour.xes.model.impl.XTraceImpl
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<XEvent>,java.util.Collection<XEvent>,java.util.List<XEvent>,java.util.RandomAccess,XAttributable,XElement,XTrace
public class XTraceImpl extends java.util.ArrayList<XEvent> implements XTrace
Memory-based implementation for the XTrace interface.- Author:
- Christian W. Guenther (christian@deckfour.org)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XTraceImpl(XAttributeMap attributeMap)Creates a new trace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(XVisitor visitor, XLog log)java.lang.Objectclone()Creates a clone, i.e.XAttributeMapgetAttributes()Retrieves the attributes set for this element.java.util.Set<XExtension>getExtensions()Retrieves the extensions used by this element, i.e.booleanhasAttributes()Checks for the existence of attributes.intinsertOrdered(XEvent event)Insert the event in an ordered manner, if timestamp information is available in this trace.voidsetAttributes(XAttributeMap attributes)Sets the map of attributes for this element.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Constructor Detail
-
XTraceImpl
public XTraceImpl(XAttributeMap attributeMap)
Creates a new trace.- Parameters:
attributeMap- Attribute map used to store this trace's attributes.
-
-
Method Detail
-
getAttributes
public XAttributeMap getAttributes()
Description copied from interface:XAttributableRetrieves the attributes set for this element.- Specified by:
getAttributesin interfaceXAttributable- Returns:
- A map of attributes.
-
getExtensions
public java.util.Set<XExtension> getExtensions()
Description copied from interface:XAttributableRetrieves the extensions used by this element, i.e. the extensions used by all attributes of this element, and the element itself.- Specified by:
getExtensionsin interfaceXAttributable- Returns:
- A set of extensions.
-
setAttributes
public void setAttributes(XAttributeMap attributes)
Description copied from interface:XAttributableSets the map of attributes for this element.- Specified by:
setAttributesin interfaceXAttributable- Parameters:
attributes- A map of attributes.
-
hasAttributes
public boolean hasAttributes()
Description copied from interface:XAttributableChecks for the existence of attributes. This method can be a more efficient way of checking for the existance of attributes than usingXAttributable.getAttributes()in certain situations.- Specified by:
hasAttributesin interfaceXAttributable- Returns:
- whether this element has any attributes
-
clone
public java.lang.Object clone()
Creates a clone, i.e. deep copy, of this trace.
-
insertOrdered
public int insertOrdered(XEvent event)
Description copied from interface:XTraceInsert the event in an ordered manner, if timestamp information is available in this trace.- Specified by:
insertOrderedin interfaceXTrace- Parameters:
event- the event to be inserted.- Returns:
- index of the inserted event.
-
-