org.processmining.framework.log.rfb
Class LightweightModelElements.LightweightModelElement

java.lang.Object
  extended by org.processmining.framework.log.rfb.LightweightModelElements.LightweightModelElement
All Implemented Interfaces:
ModelElement
Enclosing class:
LightweightModelElements

protected class LightweightModelElements.LightweightModelElement
extends java.lang.Object
implements ModelElement

Lightweight proxy class implementing a model element in the lighweight set. The trick is to avoid copying strings; instead only the index of the model element in the parent's set is stored. This dramatically decreases this class's footprint in operation and speeds up operation, by limiting the instantiation of new strings.

Author:
Christian W. Guenther (christian at deckfour dot org)

Field Summary
protected  int index
          Index of the proxied model element's name in parent's list.
protected  LightweightModelElements parent
          Reference to the fat parent.
 
Constructor Summary
protected LightweightModelElements.LightweightModelElement(LightweightModelElements parent, int index)
          Creates a new model element proxy
 
Method Summary
 java.util.Set<AuditTrailEntry> getInstances()
          Retrieves the set of audit trail entries which are instances of this model element
 java.lang.String getName()
          Retrieves the name of the proxied model element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.processmining.framework.log.ModelElement
toString
 

Field Detail

index

protected int index
Index of the proxied model element's name in parent's list.


parent

protected LightweightModelElements parent
Reference to the fat parent.

Constructor Detail

LightweightModelElements.LightweightModelElement

protected LightweightModelElements.LightweightModelElement(LightweightModelElements parent,
                                                           int index)
Creates a new model element proxy

Parameters:
parent - fat parent on which to delegate transparently
index - index of the proxied model element in parent.
Method Detail

getName

public java.lang.String getName()
Retrieves the name of the proxied model element.

Specified by:
getName in interface ModelElement
Returns:

getInstances

public java.util.Set<AuditTrailEntry> getInstances()
Retrieves the set of audit trail entries which are instances of this model element

Specified by:
getInstances in interface ModelElement
Returns: