forge.cfg
Class StmtSet
java.lang.Object
forge.cfg.StmtSet
- All Implemented Interfaces:
- CFGElement, ProgramElement, java.lang.Iterable<CFGStmt>, java.util.Collection<CFGStmt>, java.util.Set<CFGStmt>
public abstract class StmtSet
- extends java.lang.Object
- implements java.util.Set<CFGStmt>, CFGElement
A set of statements belonging to a single CFG.
- Author:
- Greg Dennis (gdennis@mit.edu)
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
StmtSet
protected StmtSet(ForgeCFG cfg,
java.util.Set<CFGStmt> stmts)
hash
public static StmtSet hash(ForgeCFG cfg)
hash
public static StmtSet hash(StmtSet s)
empty
public static StmtSet empty(ForgeCFG cfg)
singleton
public static StmtSet singleton(CFGStmt stmt)
weak
public static StmtSet weak(ForgeCFG cfg)
unmodifiable
public StmtSet unmodifiable()
program
public ForgeProgram program()
- Description copied from interface:
ProgramElement
- Returns the program to which this element belongs.
- Specified by:
program
in interface ProgramElement
cfg
public ForgeCFG cfg()
- Description copied from interface:
CFGElement
- Returns the cfg to which this element belongs.
- Specified by:
cfg
in interface CFGElement
add
public boolean add(CFGStmt e)
- Specified by:
add
in interface java.util.Collection<CFGStmt>
- Specified by:
add
in interface java.util.Set<CFGStmt>
addAll
public boolean addAll(java.util.Collection<? extends CFGStmt> c)
- Specified by:
addAll
in interface java.util.Collection<CFGStmt>
- Specified by:
addAll
in interface java.util.Set<CFGStmt>
clear
public void clear()
- Specified by:
clear
in interface java.util.Collection<CFGStmt>
- Specified by:
clear
in interface java.util.Set<CFGStmt>
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interface java.util.Collection<CFGStmt>
- Specified by:
contains
in interface java.util.Set<CFGStmt>
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll
in interface java.util.Collection<CFGStmt>
- Specified by:
containsAll
in interface java.util.Set<CFGStmt>
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface java.util.Collection<CFGStmt>
- Specified by:
equals
in interface java.util.Set<CFGStmt>
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.util.Collection<CFGStmt>
- Specified by:
hashCode
in interface java.util.Set<CFGStmt>
- Overrides:
hashCode
in class java.lang.Object
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Collection<CFGStmt>
- Specified by:
isEmpty
in interface java.util.Set<CFGStmt>
iterator
public java.util.Iterator<CFGStmt> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<CFGStmt>
- Specified by:
iterator
in interface java.util.Collection<CFGStmt>
- Specified by:
iterator
in interface java.util.Set<CFGStmt>
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interface java.util.Collection<CFGStmt>
- Specified by:
remove
in interface java.util.Set<CFGStmt>
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interface java.util.Collection<CFGStmt>
- Specified by:
removeAll
in interface java.util.Set<CFGStmt>
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interface java.util.Collection<CFGStmt>
- Specified by:
retainAll
in interface java.util.Set<CFGStmt>
size
public int size()
- Specified by:
size
in interface java.util.Collection<CFGStmt>
- Specified by:
size
in interface java.util.Set<CFGStmt>
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray
in interface java.util.Collection<CFGStmt>
- Specified by:
toArray
in interface java.util.Set<CFGStmt>
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interface java.util.Collection<CFGStmt>
- Specified by:
toArray
in interface java.util.Set<CFGStmt>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object