Clover Coverage Report
Coverage timestamp: mer. juin 27 2007 07:27:16 CEST
14   47   5   2,8
8   35   0,64   5
5     1,8  
1    
 
  ValuedLit       Line # 8 14 5 33,3% 0.33333334
 
  (101)
 
1    package org.sat4j.minisat.orders;
2   
3   
4    /**
5    * Utility class used to order the literals according to a specific heuristics.
6    *
7    */
 
8    class ValuedLit implements Comparable<ValuedLit> {
9    final int id;
10   
11    final int count;
12   
 
13  25655 toggle ValuedLit(int id,int count) {
14  25655 this.id = id;
15  25655 this.count = count;
16    }
17   
 
18  100950 toggle public int compareTo(ValuedLit t) {
19  100950 if (count == 0) {
20  0 return Integer.MAX_VALUE;
21    }
22  100950 if (t.count == 0) {
23  0 return -1;
24    }
25  100950 return count - t.count;
26    }
27   
 
28  0 toggle @Override
29    public boolean equals(Object o) {
30  0 if (o == null)
31  0 return false;
32  0 if (o instanceof ValuedLit) {
33  0 return ((ValuedLit) o).count == count;
34    }
35  0 return false;
36    }
37   
 
38  0 toggle @Override
39    public int hashCode() {
40  0 return id;
41    }
42   
 
43  0 toggle @Override
44    public String toString() {
45  0 return "" + id + "(" + count + ")"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
46    }
47    }