KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > core > analysis > ICounter


1 /*******************************************************************************
2  * Copyright (c) 2006 Mountainminds GmbH & Co. KG
3  * This software is provided under the terms of the Eclipse Public License v1.0
4  * See http://www.eclipse.org/legal/epl-v10.html.
5  *
6  * $Id: ICounter.java 11 2006-08-28 20:06:31Z mho $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.core.analysis;
9
10 /**
11  * A counter holds the total and the covered number of particular items like
12  * classes, methods, blocks or instructions. Counters provide canonical
13  * comparison of their covered/total ratios. This interface is not intended to
14  * be implemented or extended by clients.
15  *
16  * @see IJavaElementCoverage#getLineCounter()
17  * @see IJavaElementCoverage#getBlockCounter()
18  * @see IJavaElementCoverage#getInstructionCounter()
19  *
20  * @author Marc R. Hoffmann
21  * @version $Revision: 11 $
22  */

23 public interface ICounter extends Comparable JavaDoc {
24
25   /**
26    * Returns the total count number of instrumented items.
27    *
28    * @return total count of instrumented items
29    */

30   public long getTotalCount();
31
32   /**
33    * Returns the total count number of covered items.
34    *
35    * @return total count of covered items
36    */

37   public long getCoveredCount();
38
39   /**
40    * Calculates the ratio of covered to total count items. If total count items
41    * is 0 this method returns NaN.
42    *
43    * @return ratio of covered to total count items
44    */

45   public double getRatio();
46
47 }
48
Popular Tags