|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
soot.PatchingChain<E>
public class PatchingChain<E extends Unit>
An implementation of a Chain which can contain only Units, and handles patching to deal with element insertions and removals. This is done by calling Unit.redirectJumpsToThisTo at strategic times.
Nested Class Summary | |
---|---|
protected class |
PatchingChain.PatchingIterator
|
Field Summary | |
---|---|
protected Chain<E> |
innerChain
|
Constructor Summary | |
---|---|
PatchingChain(Chain<E> aChain)
Constructs a PatchingChain from the given Chain. |
Method Summary | |
---|---|
boolean |
add(E o)
Adds the given object to this Chain. |
void |
addFirst(E u)
Adds the given object at the beginning of the Chain. |
void |
addLast(E u)
Adds the given object at the end of the Chain. |
boolean |
contains(Object u)
Returns true if this patching chain contains the specified element. |
boolean |
follows(E a,
E b)
Returns true if object a follows object b in the Chain. |
E |
getFirst()
Returns the first object in this Chain. |
E |
getLast()
Returns the last object in this Chain. |
Chain<E> |
getNonPatchingChain()
Returns the inner chain used by the PatchingChain. |
E |
getPredOf(E point)
Returns the object immediately preceding point . |
E |
getSuccOf(E point)
Returns the object immediately following point . |
void |
insertAfter(Chain<E> toInsert,
E point)
Inserts toInsert in the Chain after point . |
void |
insertAfter(E toInsert,
E point)
Inserts toInsert in the Chain after point . |
void |
insertAfter(List<E> toInsert,
E point)
Inserts toInsert in the Chain after point . |
void |
insertBefore(Chain<E> toInsert,
E point)
Inserts toInsert in the Chain before point . |
void |
insertBefore(E toInsert,
E point)
Inserts toInsert in the Chain before point . |
void |
insertBefore(List<E> toInsert,
E point)
Inserts toInsert in the Chain before point . |
void |
insertBeforeNoRedirect(E toInsert,
E point)
Inserts toInsert in the Chain before point WITHOUT redirecting jumps. |
Iterator<E> |
iterator()
Returns an iterator over this Chain. |
Iterator<E> |
iterator(E u)
Returns an iterator over this Chain, starting at the given object. |
Iterator<E> |
iterator(E head,
E tail)
Returns an iterator over this Chain, starting at head and reaching tail (inclusive). |
boolean |
remove(Object obj)
Removes the given object from this Chain. |
void |
removeFirst()
Removes the first object from this Chain. |
void |
removeLast()
Removes the last object from this Chain. |
int |
size()
Returns the size of this Chain. |
Iterator<E> |
snapshotIterator()
Returns an iterator over a copy of this chain. |
void |
swapWith(E out,
E in)
Replaces out in the Chain by in . |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
Field Detail |
---|
protected Chain<E extends Unit> innerChain
Constructor Detail |
---|
public PatchingChain(Chain<E> aChain)
Method Detail |
---|
public Chain<E> getNonPatchingChain()
public boolean add(E o)
add
in interface Collection<E extends Unit>
add
in class AbstractCollection<E extends Unit>
public void swapWith(E out, E in)
out
in the Chain by in
.
swapWith
in interface Chain<E extends Unit>
public void insertAfter(E toInsert, E point)
toInsert
in the Chain after point
.
insertAfter
in interface Chain<E extends Unit>
public void insertAfter(List<E> toInsert, E point)
toInsert
in the Chain after point
.
insertAfter
in interface Chain<E extends Unit>
public void insertAfter(Chain<E> toInsert, E point)
Chain
toInsert
in the Chain after point
.
(It would probably be better to make Chain implement List)
insertAfter
in interface Chain<E extends Unit>
public void insertBefore(List<E> toInsert, E point)
toInsert
in the Chain before point
.
insertBefore
in interface Chain<E extends Unit>
public void insertBefore(Chain<E> toInsert, E point)
toInsert
in the Chain before point
.
insertBefore
in interface Chain<E extends Unit>
public void insertBefore(E toInsert, E point)
toInsert
in the Chain before point
.
insertBefore
in interface Chain<E extends Unit>
public void insertBeforeNoRedirect(E toInsert, E point)
toInsert
in the Chain before point
WITHOUT redirecting jumps.
public boolean follows(E a, E b)
a
follows object b
in the Chain.
follows
in interface Chain<E extends Unit>
public boolean remove(Object obj)
remove
in interface Collection<E extends Unit>
remove
in interface Chain<E extends Unit>
remove
in class AbstractCollection<E extends Unit>
public boolean contains(Object u)
contains
in interface Collection<E extends Unit>
contains
in class AbstractCollection<E extends Unit>
public void addFirst(E u)
addFirst
in interface Chain<E extends Unit>
public void addLast(E u)
addLast
in interface Chain<E extends Unit>
public void removeFirst()
removeFirst
in interface Chain<E extends Unit>
public void removeLast()
removeLast
in interface Chain<E extends Unit>
public E getFirst()
getFirst
in interface Chain<E extends Unit>
public E getLast()
getLast
in interface Chain<E extends Unit>
public E getSuccOf(E point)
point
.
getSuccOf
in interface Chain<E extends Unit>
public E getPredOf(E point)
point
.
getPredOf
in interface Chain<E extends Unit>
public Iterator<E> snapshotIterator()
snapshotIterator
in interface Chain<E extends Unit>
public Iterator<E> iterator()
iterator
in interface Iterable<E extends Unit>
iterator
in interface Collection<E extends Unit>
iterator
in interface Chain<E extends Unit>
iterator
in class AbstractCollection<E extends Unit>
public Iterator<E> iterator(E u)
iterator
in interface Chain<E extends Unit>
public Iterator<E> iterator(E head, E tail)
iterator
in interface Chain<E extends Unit>
public int size()
size
in interface Collection<E extends Unit>
size
in interface Chain<E extends Unit>
size
in class AbstractCollection<E extends Unit>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |