Clover coverage report - Replica - 1.0-Alpha
Coverage timestamp: Dom Fev 1 2004 17:00:58 WET
file stats: LOC: 78   Methods: 12
NCLOC: 61   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
ExtBitSet.java 0% 0% 0% 0%
coverage
 1   
 package nmp.util;
 2   
 
 3   
 import java.util.*;
 4   
 
 5   
 /**
 6   
  * Similar to BitSet extended with a counter of the number of elements set to 1.
 7   
  */
 8   
 public class ExtBitSet
 9   
 {
 10   
     private int len;
 11   
     public BitSet s;
 12   
 
 13  0
     public ExtBitSet( int size) {
 14  0
         s = new BitSet( size);
 15  0
         len = 0;
 16   
     }
 17   
 
 18  0
     public ExtBitSet() {
 19  0
         s = new BitSet();
 20  0
         len = 0;
 21   
     }
 22   
 
 23  0
     protected ExtBitSet( ExtBitSet s0) {
 24  0
         this.len = s0.len;
 25  0
         this.s = (BitSet)s0.s.clone();
 26   
     }
 27   
 
 28  0
     public Object clone() {
 29  0
         return new ExtBitSet( this);
 30   
     }
 31  0
     public boolean get( int pos) {
 32  0
         return s.get( pos);
 33   
     }
 34   
 
 35  0
     public void set( int pos) {
 36  0
         if( ! s.get( pos)) {
 37  0
             s.set( pos);
 38  0
             len++;
 39   
         }
 40   
     }
 41   
 
 42  0
     public void clear( int pos) {
 43  0
         if( s.get( pos)) {
 44  0
             s.clear( pos);
 45  0
             len--;
 46   
         }
 47   
     }
 48   
 
 49  0
     public void and( BitSet s0) {
 50  0
         s.and( s0);
 51  0
         len = -30000;
 52   
     }
 53   
 
 54  0
     public void xor( BitSet s0) {
 55  0
         s.xor( s0);
 56  0
         len = -30000;
 57   
     }
 58   
 
 59  0
     public void or( BitSet s0) {
 60  0
         s.or( s0);
 61  0
         len = -30000;
 62   
     }
 63   
 
 64  0
     public int size() {
 65  0
         return s.size();
 66   
     }
 67   
 
 68  0
     public int numElems() {
 69  0
         if( len < 0) {
 70  0
             len = 0;
 71  0
             for( int i = 0; i < s.size(); i++)
 72  0
                 if( s.get( i))
 73  0
                     len++;
 74   
         }
 75  0
         return len;
 76   
     }
 77   
 }
 78