public class DavaFlowSet<T> extends AbstractFlowSet<T>
Constructor and Description |
---|
DavaFlowSet() |
DavaFlowSet(DavaFlowSet<T> other) |
Modifier and Type | Method and Description |
---|---|
void |
add(T e)
Adds
obj to this . |
void |
addToBreakList(String labelBroken,
DavaFlowSet<T> set)
When an explicit break statement is encountered this method should be called to store the current davaflowset
|
void |
addToContinueList(String labelContinued,
DavaFlowSet<T> set)
When an explicit continue statement is encountered this method should be called to store the current davaflowset
|
void |
addToImplicitBreaks(DAbruptStmt ab,
DavaFlowSet<T> set)
The next two methods take an abruptStmt as input along with a flowSet.
|
void |
addToImplicitContinues(DAbruptStmt ab,
DavaFlowSet<T> set) |
void |
clear()
implemented, but *very* inefficient.
|
DavaFlowSet<T> |
clone()
Clones the current FlowSet.
|
boolean |
contains(Object obj)
Returns true if this FlowSet contains
obj . |
void |
copy(FlowSet<T> destFlow)
Copies the current FlowSet into dest.
|
void |
copyInternalDataFrom(DavaFlowSet<T> fromThis) |
void |
difference(FlowSet<T> otherFlow,
FlowSet<T> destFlow)
Returns the set difference (this intersect ~other) of this FlowSet and
other , putting result into
dest . |
FlowSet<T> |
emptySet()
implemented, but inefficient.
|
boolean |
equals(Object otherFlow)
Notice that the equals method only checks the equality of the elements of the flow set DavaFlowSet also contains
information regarding abrupt control flow This should also be checked by invoking the internalDataMatchesTo method
|
List<DavaFlowSet<T>> |
getBreakSet(String label) |
List<DavaFlowSet<T>> |
getContinueSet(String label) |
T |
getElementAt(int idx) |
int |
getElementCount() |
HashMap<Serializable,List<DavaFlowSet<T>>> |
getImplicitBreaks() |
HashMap<Serializable,List<DavaFlowSet<T>>> |
getImplicitContinues() |
List<DavaFlowSet<T>> |
getImplicitlyBrokenSets(ASTNode node) |
List<DavaFlowSet<T>> |
getImplicitlyContinuedSets(ASTNode node) |
boolean |
internalDataMatchesTo(Object otherObj) |
void |
intersection(FlowSet<T> otherFlow,
FlowSet<T> destFlow)
Notice that the intersection method only merges the elements of the flow set DavaFlowSet also contains information
regarding abrupt control flow This should also be merged using the copyInternalDataFrom method
|
boolean |
isEmpty()
Returns true if this FlowSet is the empty set.
|
Iterator<T> |
iterator()
returns an iterator over the elements of the flowSet.
|
void |
remove(int idx) |
void |
remove(Object obj)
Removes
obj from this . |
int |
size()
Returns the size of the current FlowSet.
|
List<T> |
toList()
Returns a unbacked list of elements in this set.
|
String |
toString() |
void |
union(FlowSet<T> otherFlow,
FlowSet<T> destFlow)
Notice that the union method only merges the elements of the flow set DavaFlowSet also contains information regarding
abrupt control flow This should also be merged using the copyInternalDataFrom method
|
add, difference, hashCode, intersection, isSubSet, remove, union
finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected T[] elements
public DavaFlowSet()
public DavaFlowSet(DavaFlowSet<T> other)
public DavaFlowSet<T> clone()
FlowSet
public FlowSet<T> emptySet()
AbstractFlowSet
public void clear()
AbstractFlowSet
public int size()
FlowSet
public boolean isEmpty()
FlowSet
public void remove(Object obj)
FlowSet
obj
from this
.public void remove(int idx)
public void union(FlowSet<T> otherFlow, FlowSet<T> destFlow)
public void intersection(FlowSet<T> otherFlow, FlowSet<T> destFlow)
intersection
in interface FlowSet<T>
intersection
in class AbstractFlowSet<T>
public void difference(FlowSet<T> otherFlow, FlowSet<T> destFlow)
FlowSet
other
, putting result into
dest
. dest
, other
and this
could be the same object.difference
in interface FlowSet<T>
difference
in class AbstractFlowSet<T>
public boolean contains(Object obj)
FlowSet
obj
.public boolean equals(Object otherFlow)
equals
in class AbstractFlowSet<T>
public void copy(FlowSet<T> destFlow)
FlowSet
public void addToBreakList(String labelBroken, DavaFlowSet<T> set)
public void addToContinueList(String labelContinued, DavaFlowSet<T> set)
public void addToImplicitBreaks(DAbruptStmt ab, DavaFlowSet<T> set)
public void addToImplicitContinues(DAbruptStmt ab, DavaFlowSet<T> set)
public HashMap<Serializable,List<DavaFlowSet<T>>> getImplicitBreaks()
public HashMap<Serializable,List<DavaFlowSet<T>>> getImplicitContinues()
public List<DavaFlowSet<T>> getImplicitlyBrokenSets(ASTNode node)
public List<DavaFlowSet<T>> getImplicitlyContinuedSets(ASTNode node)
public void copyInternalDataFrom(DavaFlowSet<T> fromThis)
public boolean internalDataMatchesTo(Object otherObj)
public List<DavaFlowSet<T>> getContinueSet(String label)
public List<DavaFlowSet<T>> getBreakSet(String label)
public String toString()
toString
in class AbstractFlowSet<T>
public Iterator<T> iterator()
FlowSet
toList().iterator()
.public int getElementCount()
public T getElementAt(int idx)
Copyright © 2020 Sable. All rights reserved.