EMMA Coverage Report (generated Sat Aug 20 11:00:51 CDT 2011)
[all classes][tuffy.infer.ds]

COVERAGE SUMMARY FOR SOURCE FILE [KeyBlock.java]

nameclass, %method, %block, %line, %
KeyBlock.java100% (1/1)50%  (2/4)33%  (18/55)40%  (4/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class KeyBlock100% (1/1)50%  (2/4)33%  (18/55)40%  (4/10)
getBlockMates (GAtom): ArrayList 0%   (0/1)0%   (0/9)0%   (0/1)
pushGAtom (Integer, GAtom): void 0%   (0/1)0%   (0/28)0%   (0/5)
KeyBlock (): void 100% (1/1)100% (13/13)100% (3/3)
hasKey (GAtom): boolean 100% (1/1)100% (5/5)100% (1/1)

1package tuffy.infer.ds;
2 
3import java.util.ArrayList;
4import java.util.HashMap;
5/**
6 * A block of ground atoms. Exactly one atom in a block can be true.
7 */
8public class KeyBlock{
9 
10        public HashMap<Integer, ArrayList<GAtom>> keyConstraints = new HashMap<Integer, ArrayList<GAtom>>();
11        
12        public HashMap<GAtom, Integer> gatom2key = new HashMap<GAtom, Integer>();
13        
14        public void pushGAtom(Integer key, GAtom gatom){
15                
16                if(!keyConstraints.containsKey(key)){
17                        this.keyConstraints.put(key, new ArrayList<GAtom>());
18                }
19                this.keyConstraints.get(key).add(gatom);
20                this.gatom2key.put(gatom, key);
21        }
22        
23        public boolean hasKey(GAtom gatom){
24                return this.gatom2key.containsKey(gatom);
25        }
26        
27        public ArrayList<GAtom> getBlockMates(GAtom gatom){
28                return this.keyConstraints.get(gatom2key.get(gatom));
29        }
30        
31}

[all classes][tuffy.infer.ds]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov