public class PptMap extends Object implements Serializable
This is the major data structure of Daikon. All the invariants can be found in it, and an
.inv
file contains (only) the serialized form of this object.
Constructor and Description |
---|
PptMap() |
Modifier and Type | Method and Description |
---|---|
void |
add(PptTopLevel ppt) |
void |
addAll(List<PptTopLevel> ppts) |
Collection<PptTopLevel> |
all_ppts()
Returns all of the program points in the map.
|
Collection<PptTopLevel> |
asCollection()
Returns unstably-ordered collection of PptTopLevels.
|
boolean |
containsName(String name)
Returns whether or not 'name' is the name of a Ppt in the map.
|
int |
countSlices()
Return the number of active PptSlices.
|
@Nullable PptTopLevel |
get(PptName name)
Get the pptname 'name' from the map.
|
@Nullable PptTopLevel |
get(String name)
Get the pptname named 'name' from the map.
|
Collection<String> |
nameStringSet()
Returns an unmodifiable version of the keySet.
|
Iterable<PptTopLevel> |
ppt_all_iterable()
Returns an iterable over the PptTopLevels in this, sorted by Ppt.NameComparator on their names.
|
Iterator<PptTopLevel> |
ppt_all_iterator()
Returns an iterator over the PptTopLevels in this, sorted by Ppt.NameComparator on their names.
|
Iterable<PptTopLevel> |
pptIterable()
Returns an iterable over the PptTopLevels in this, sorted by Ppt.NameComparator on their names.
|
Iterator<PptTopLevel> |
pptIterator()
Returns an iterator over the PptTopLevels in this, sorted by Ppt.NameComparator on their names.
|
void |
removeUnsampled()
Blow away any PptTopLevels that never saw any samples (to reclaim space).
|
void |
repCheck()
Check the rep invariant of this.
|
int |
size() |
String |
toString() |
void |
trimToSize()
Iterate over the PptTopLevels and trim them.
|
public PptMap()
public void add(PptTopLevel ppt)
public void addAll(List<PptTopLevel> ppts)
@Pure public @Nullable PptTopLevel get(String name)
@Pure public @Nullable PptTopLevel get(PptName name)
@Pure @EnsuresNonNullIf(result=true, expression="get(#1)") public boolean containsName(String name)
public Collection<PptTopLevel> all_ppts()
public Collection<PptTopLevel> asCollection()
pptIterator()
public Collection<String> nameStringSet()
public Iterator<PptTopLevel> pptIterator()
If you wish to merely iterate over the result in a foreach loop, use pptIterable()
instead.
pptIterable()
public Iterable<PptTopLevel> pptIterable()
It is a wrapper around pptIterator()
that can be used in a foreach loop.
pptIterator()
public Iterator<PptTopLevel> ppt_all_iterator()
If you wish to merely iterate over the result in a Java new-style for loop ("foreach loop"),
use ppt_all_iterable()
instead.
ppt_all_iterable()
public Iterable<PptTopLevel> ppt_all_iterable()
It is a wrapper around ppt_all_iterator()
that can be used in a Java new-style for
loop ("foreach loop").
ppt_all_iterator()
public void trimToSize()
public void repCheck()
@Pure public int countSlices()
@Pure public int size()
public void removeUnsampled()