junit.quilt.framework
Class QuiltCollectorImpl

java.lang.Object
  |
  +--junit.quilt.framework.QuiltCollectorImpl
All Implemented Interfaces:
QuiltCollector
Direct Known Subclasses:
B94Collector, NoneCollector, SimpleStateMachine

public abstract class QuiltCollectorImpl
extends java.lang.Object
implements QuiltCollector


Fields inherited from interface junit.quilt.framework.QuiltCollector
BRANCH_COVERAGE, LOOP_COVERAGE, PATH_COVERAGE, RELATIONAL_COVERAGE, STATEMENT_COVERAGE
 
Constructor Summary
protected QuiltCollectorImpl(java.lang.String[] capabilities)
           
 
Method Summary
protected  void addSegment(java.lang.String coverage, CoverageSegment segment)
           
protected  java.util.Set findCovered(java.util.Set segs)
           
protected  java.util.Set findUncovered(java.util.Set segs)
           
 java.util.Set getAll(java.lang.String coverage)
          getAll - Returns the set of all CoverageSegments for a particular coverage.
 java.util.Set getCapabilities()
          getCapabilities This returns the set of coverage that this collector knows about.
 java.util.Set getCovered(java.lang.String coverage)
          getCovered This returns a Set of custom objects regarding what has been covered since the test has been started.
 java.util.Map getSummary()
          getSummary This returns a map of STRING X DOUBLE where String is one of the constants defined in this interface (or a custom constant, for custom coverage metric), and double is the percentage covered.
 java.util.Set getUncovered(java.lang.String coverage)
          getUncovered This returns a Set of custom objects regarding what has not been covered since the test has been started.
protected  void removeSegment(java.lang.String coverage, CoverageSegment segment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface junit.quilt.framework.QuiltCollector
reset
 

Constructor Detail

QuiltCollectorImpl

protected QuiltCollectorImpl(java.lang.String[] capabilities)
Method Detail

addSegment

protected void addSegment(java.lang.String coverage,
                          CoverageSegment segment)

removeSegment

protected void removeSegment(java.lang.String coverage,
                             CoverageSegment segment)

findCovered

protected java.util.Set findCovered(java.util.Set segs)

getCovered

public java.util.Set getCovered(java.lang.String coverage)
Description copied from interface: QuiltCollector
getCovered This returns a Set of custom objects regarding what has been covered since the test has been started. NULL is returned if the collector has no knowledge of the coverage requested.
Specified by:
getCovered in interface QuiltCollector
Following copied from interface: junit.quilt.framework.QuiltCollector
Parameters:
coverage - is one of the Strings defined in this interface, or a custom string if the coverage measured is not defined here.

findUncovered

protected java.util.Set findUncovered(java.util.Set segs)

getUncovered

public java.util.Set getUncovered(java.lang.String coverage)
Description copied from interface: QuiltCollector
getUncovered This returns a Set of custom objects regarding what has not been covered since the test has been started. NULL is returned if the collector has no knowledge of the coverage requested.
Specified by:
getUncovered in interface QuiltCollector
Following copied from interface: junit.quilt.framework.QuiltCollector
Parameters:
coverage - is one of the Strings defined in this interface, or a custom string if the coverage measured is not defined here.

getAll

public java.util.Set getAll(java.lang.String coverage)
getAll - Returns the set of all CoverageSegments for a particular coverage. It is possible that the coverage segments returned can change from call to call. (Ball94 overrides this method, because it is difficult to seperate the values.)
Specified by:
getAll in interface QuiltCollector
Following copied from interface: junit.quilt.framework.QuiltCollector
Parameters:
coverage - is defined in this interface or it can be something else if it is not coded here.

getCapabilities

public java.util.Set getCapabilities()
Description copied from interface: QuiltCollector
getCapabilities This returns the set of coverage that this collector knows about.
Specified by:
getCapabilities in interface QuiltCollector

getSummary

public java.util.Map getSummary()
Description copied from interface: QuiltCollector
getSummary This returns a map of STRING X DOUBLE where String is one of the constants defined in this interface (or a custom constant, for custom coverage metric), and double is the percentage covered.
Specified by:
getSummary in interface QuiltCollector


Copyright © 2001-2002 David Dixon-Peugh. All Rights Reserved.