public class EmptyChain extends java.lang.Object implements Chain
Constructor and Description |
---|
EmptyChain() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object e) |
boolean |
addAll(java.util.Collection c) |
void |
addFirst(java.lang.Object u)
Adds the given object at the beginning of the Chain.
|
void |
addLast(java.lang.Object u)
Adds the given object at the end of the Chain.
|
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection c) |
boolean |
follows(java.lang.Object someObject,
java.lang.Object someReferenceObject)
Returns true if object
someObject follows object someReferenceObject in the Chain. |
java.util.Collection |
getElementsUnsorted()
Gets all elements in the chain.
|
java.lang.Object |
getFirst()
Returns the first object in this Chain.
|
java.lang.Object |
getLast()
Returns the last object in this Chain.
|
long |
getModificationCount()
Returns the number of times this chain has been modified.
|
java.lang.Object |
getPredOf(java.lang.Object point)
Returns the object immediately preceding
point . |
java.lang.Object |
getSuccOf(java.lang.Object point)
Returns the object immediately following
point . |
void |
insertAfter(Chain toInsert,
java.lang.Object point)
Inserts
toInsert in the Chain after point . |
void |
insertAfter(java.util.List toInsert,
java.lang.Object point)
Inserts
toInsert in the Chain after point . |
void |
insertAfter(java.lang.Object toInsert,
java.lang.Object point)
Inserts
toInsert in the Chain after point . |
void |
insertBefore(Chain toInsert,
java.lang.Object point)
Inserts
toInsert in the Chain before point . |
void |
insertBefore(java.util.List toInsert,
java.lang.Object point)
Inserts
toInsert in the Chain before point . |
void |
insertBefore(java.lang.Object toInsert,
java.lang.Object point)
Inserts
toInsert in the Chain before point . |
void |
insertOnEdge(Chain toInsert,
java.lang.Object point_src,
java.lang.Object point_tgt)
Inserts instrumentation in a manner such that the resulting control flow
graph (CFG) of the program will contain
toInsert on an edge
that is defined by point_source and point_target . |
void |
insertOnEdge(java.util.List toInsert,
java.lang.Object point_src,
java.lang.Object point_tgt)
Inserts instrumentation in a manner such that the resulting control flow
graph (CFG) of the program will contain
toInsert on an edge
that is defined by point_source and point_target . |
void |
insertOnEdge(java.lang.Object toInsert,
java.lang.Object point_src,
java.lang.Object point_tgt)
Inserts instrumentation in a manner such that the resulting control flow
graph (CFG) of the program will contain
toInsert on an edge
that is defined by point_source and point_target . |
boolean |
isEmpty() |
java.util.Iterator |
iterator()
Returns an iterator over this Chain.
|
java.util.Iterator |
iterator(java.lang.Object u)
Returns an iterator over this Chain, starting at the given object.
|
java.util.Iterator |
iterator(java.lang.Object head,
java.lang.Object tail)
Returns an iterator over this Chain, starting at head and reaching tail (inclusive).
|
boolean |
remove(java.lang.Object u)
Removes the given object from this Chain.
|
boolean |
removeAll(java.util.Collection c) |
void |
removeFirst()
Removes the first object contained in this Chain.
|
void |
removeLast()
Removes the last object contained in this Chain.
|
boolean |
retainAll(java.util.Collection c) |
int |
size()
Returns the size of this Chain.
|
java.util.Iterator |
snapshotIterator()
Returns an iterator over a copy of this chain.
|
void |
swapWith(java.lang.Object out,
java.lang.Object in)
Replaces
out in the Chain by in . |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] a) |
static EmptyChain |
v() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static EmptyChain v()
public boolean isEmpty()
isEmpty
in interface java.util.Collection
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
public boolean add(java.lang.Object e)
add
in interface java.util.Collection
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
public void clear()
clear
in interface java.util.Collection
public void insertBefore(java.util.List toInsert, java.lang.Object point)
Chain
toInsert
in the Chain before point
.insertBefore
in interface Chain
public void insertAfter(java.util.List toInsert, java.lang.Object point)
Chain
toInsert
in the Chain after point
.insertAfter
in interface Chain
public void insertAfter(java.lang.Object toInsert, java.lang.Object point)
Chain
toInsert
in the Chain after point
.insertAfter
in interface Chain
public void insertBefore(java.lang.Object toInsert, java.lang.Object point)
Chain
toInsert
in the Chain before point
.insertBefore
in interface Chain
public void insertBefore(Chain toInsert, java.lang.Object point)
Chain
toInsert
in the Chain before point
.
(It would probably be better to make Chain implement List)insertBefore
in interface Chain
public void insertAfter(Chain toInsert, java.lang.Object point)
Chain
toInsert
in the Chain after point
.
(It would probably be better to make Chain implement List)insertAfter
in interface Chain
public void insertOnEdge(java.lang.Object toInsert, java.lang.Object point_src, java.lang.Object point_tgt)
Chain
toInsert
on an edge
that is defined by point_source
and point_target
.insertOnEdge
in interface Chain
toInsert
- the instrumentation to be added in the Chainpoint_src
- the source point of an edge in CFGpoint_tgt
- the target point of an edgepublic void insertOnEdge(java.util.List toInsert, java.lang.Object point_src, java.lang.Object point_tgt)
Chain
toInsert
on an edge
that is defined by point_source
and point_target
.insertOnEdge
in interface Chain
toInsert
- instrumentation to be added in the Chainpoint_src
- the source point of an edge in CFGpoint_tgt
- the target point of an edgepublic void insertOnEdge(Chain toInsert, java.lang.Object point_src, java.lang.Object point_tgt)
Chain
toInsert
on an edge
that is defined by point_source
and point_target
.insertOnEdge
in interface Chain
toInsert
- instrumentation to be added in the Chainpoint_src
- the source point of an edge in CFGpoint_tgt
- the target point of an edgepublic void swapWith(java.lang.Object out, java.lang.Object in)
Chain
out
in the Chain by in
.public boolean remove(java.lang.Object u)
Chain
Object
to be compatible
with the Collection
interface.public void addFirst(java.lang.Object u)
Chain
public void addLast(java.lang.Object u)
Chain
public void removeFirst()
Chain
removeFirst
in interface Chain
public void removeLast()
Chain
removeLast
in interface Chain
public boolean follows(java.lang.Object someObject, java.lang.Object someReferenceObject)
Chain
someObject
follows object someReferenceObject
in the Chain.public java.lang.Object getFirst()
Chain
public java.lang.Object getLast()
Chain
public java.lang.Object getSuccOf(java.lang.Object point)
Chain
point
.public java.lang.Object getPredOf(java.lang.Object point)
Chain
point
.public java.util.Iterator snapshotIterator()
Chain
snapshotIterator
in interface Chain
public java.util.Iterator iterator()
Chain
public java.util.Iterator iterator(java.lang.Object u)
Chain
public java.util.Iterator iterator(java.lang.Object head, java.lang.Object tail)
Chain
public int size()
Chain
public long getModificationCount()
Chain
getModificationCount
in interface Chain
public java.util.Collection getElementsUnsorted()
Chain
getElementsUnsorted
in interface Chain