|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectth.co.edge.jseq.ActivationList
public class ActivationList
An ActivationList holds a number of Activation
instances, representing a number of method calls. This can be used to hold
nested method call made by a method, or all root activation, i.e., methods
that are not called by one of the traced methods but "magically" from outside
the sequence diagram.
| Nested Class Summary | |
|---|---|
static interface |
ActivationList.Filter
An interface used by the filter and find
methods to determine if an Activation is acceptable or
not. |
| Constructor Summary | |
|---|---|
ActivationList()
|
|
| Method Summary | |
|---|---|
void |
add(Activation activation)
Adds an Activation to this list. |
void |
addAll(ActivationList activationList)
Adds all Activations from another
ActivationList to this list. |
ActivationList |
collapseRepetitions()
Returns an ActivationList where all consecutive identical
Activations but the first have been removed, and its
numRepetitions property increased accordingly. |
ActivationList |
copy()
Performs a deep copy of this ActivationList, copying all
Activations and recursively the nested
Activations. |
boolean |
equals(java.lang.Object o)
Compares this ActivationList to another object, and
returns true if and only if the other object is an
ActivationList with equal Activations. |
ActivationList |
filter(ActivationList.Filter filter)
Returns a new ActivationList containing only the
Activations for which the given filter returns
true. |
ActivationList |
find(ActivationList.Filter filter)
Returns a new ActivationList where the activations and
nested activations have been pruned, so as to start with an activation
that is accepted by the given filter. |
Activation |
get(int index)
Returns the Activation at a certain position in this list. |
int |
hashCode()
Returns a hash code for this ActivationList. |
java.util.Iterator<Activation> |
iterator()
Returns an iterator that iterates over the Activations in
this list, in the order they were added. |
Activation |
remove(int index)
Removes an Activation at a certain position in this list. |
void |
setParent(Activation parent)
Sets the parent Activation of all Activations
in this list to the given value. |
int |
size()
Returns the size of this ActivationList. |
java.lang.String |
toString()
Returns a string representation of this ActivationList. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ActivationList()
| Method Detail |
|---|
public void add(Activation activation)
Activation to this list.
activation - the Activation to addpublic void addAll(ActivationList activationList)
Activations from another
ActivationList to this list.
activationList - the ActivationList whose
Activations will be added to this listpublic Activation remove(int index)
Activation at a certain position in this list.
index - the position in this list to remove
Activationpublic Activation get(int index)
Activation at a certain position in this list.
index - the position in this list to return
Activation at position index in
this listpublic int size()
ActivationList.
public java.util.Iterator<Activation> iterator()
Activations in
this list, in the order they were added.
iterator in interface java.lang.Iterable<Activation>Activations in
this listpublic ActivationList filter(ActivationList.Filter filter)
ActivationList containing only the
Activations for which the given filter returns
true. The filtering is also done recursively on nested
Activations.
filter - the Filter instance used to determine which
Activations should be included
ActivationList containing only the
Activations that filter acceptspublic ActivationList find(ActivationList.Filter filter)
ActivationList where the activations and
nested activations have been pruned, so as to start with an activation
that is accepted by the given filter. In other words, this method "lifts"
activations accepted by the filter to be root activations.
For example, given the following activations:
m
m1
q1
q2
m2
p
m1
q3
p2
and a filter that only accepts methods named "m1", the following list
would be returned:
m1
q1
q2
m1
q3
filter - the Filter instance used to determine which
Activations should be used as root activations
ActivationList with Activations
accepted by filter as root activationspublic void setParent(Activation parent)
Activation of all Activations
in this list to the given value.
parent - the new parent activationpublic ActivationList collapseRepetitions()
ActivationList where all consecutive identical
Activations but the first have been removed, and its
numRepetitions property increased accordingly.
ActivationList with no repeated identical
Activationspublic ActivationList copy()
ActivationList, copying all
Activations and recursively the nested
Activations.
ActivationList containing a deep copy of all
Activations in this listpublic java.lang.String toString()
ActivationList.
toString in class java.lang.ObjectActivationListpublic boolean equals(java.lang.Object o)
ActivationList to another object, and
returns true if and only if the other object is an
ActivationList with equal Activations.
equals in class java.lang.Objecto - the object to compare this ActivationList to
true if o is an
ActivationList with equal activations,
false otherwisepublic int hashCode()
ActivationList.
hashCode in class java.lang.ObjectActivationList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||