|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object th.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 Activation s from another
ActivationList to this list. |
ActivationList |
collapseRepetitions()
Returns an ActivationList where all consecutive identical
Activation s but the first have been removed, and its
numRepetitions property increased accordingly. |
ActivationList |
copy()
Performs a deep copy of this ActivationList , copying all
Activation s and recursively the nested
Activation s. |
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 Activation s. |
ActivationList |
filter(ActivationList.Filter filter)
Returns a new ActivationList containing only the
Activation s 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 Activation s 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 Activation s
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)
Activation
s from another
ActivationList
to this list.
activationList
- the ActivationList
whose
Activation
s 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
Activation
public 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()
Activation
s in
this list, in the order they were added.
iterator
in interface java.lang.Iterable<Activation>
Activation
s in
this listpublic ActivationList filter(ActivationList.Filter filter)
ActivationList
containing only the
Activation
s for which the given filter returns
true
. The filtering is also done recursively on nested
Activation
s.
filter
- the Filter
instance used to determine which
Activation
s should be included
ActivationList
containing only the
Activation
s 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 p2and 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
Activation
s should be used as root activations
ActivationList
with Activation
s
accepted by filter
as root activationspublic void setParent(Activation parent)
Activation
of all Activation
s
in this list to the given value.
parent
- the new parent activationpublic ActivationList collapseRepetitions()
ActivationList
where all consecutive identical
Activation
s but the first have been removed, and its
numRepetitions
property increased accordingly.
ActivationList
with no repeated identical
Activation
spublic ActivationList copy()
ActivationList
, copying all
Activation
s and recursively the nested
Activation
s.
ActivationList
containing a deep copy of all
Activation
s in this listpublic java.lang.String toString()
ActivationList
.
toString
in class java.lang.Object
ActivationList
public 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 Activation
s.
equals
in class java.lang.Object
o
- 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.Object
ActivationList
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |