|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quilt.cover.seg.Segment
A segment for coverage purposes. It has an index and visit count, and 'from' and 'to', which will typically be line numbers or indices of some sort.
Constructor Summary | |
Segment()
No-arg constructor; creates a segment with -1 index. |
|
Segment(int n)
Constructor specifying a segment index. |
Method Summary | |
protected Segment |
add(Segment seg)
Add the visit count from another segment. |
int |
getFrom()
Get the 'from' value. |
int |
getIndex()
Get the (ideally unique) index of the segment. |
int |
getTo()
Get the 'to' value. |
int |
getVisits()
Get the number of visits so far. |
void |
reset()
Set the number of visits to zero. |
void |
setFrom(int n)
Set the 'from' value. |
void |
setIndex(int n)
Set the segment index. |
void |
setTo(int n)
Set the 'to' value. |
void |
setVisits(int n)
Set the number of visits; may never be used. |
java.lang.String |
toString()
Format the segment for output as a String. |
java.lang.String |
toXML(java.lang.String type)
Format the segment for XML output. |
void |
visit()
Step the visit count. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Segment()
public Segment(int n)
n
- The index; should be non-negative.Method Detail |
public int getFrom()
public void setFrom(int n)
public int getIndex()
public void setIndex(int n)
public int getTo()
public void setTo(int n)
public int getVisits()
public void reset()
public void setVisits(int n)
protected Segment add(Segment seg)
seg
- Reference to the other segment.public void visit()
public java.lang.String toXML(java.lang.String type)
type
- String whose value is appropriate for an XML element name.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |