EMMA Coverage Report (generated Mon Aug 23 17:21:34 CEST 2010) |
---|
[all classes][dmg.util] |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
Gate.java | 100% (1/1) | 60% (3/5) | 54% (20/37) | 58% (7.6/13) |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
class Gate | 100% (1/1) | 60% (3/5) | 54% (20/37) | 58% (7.6/13) |
Gate (): void | 0% (0/1) | 0% (0/6) | 0% (0/2) | |
close (): void | 0% (0/1) | 0% (0/6) | 0% (0/3) | |
check (): Object | 100% (1/1) | 50% (5/10) | 50% (1/2) | |
Gate (boolean): void | 100% (1/1) | 100% (9/9) | 100% (4/4) | |
open (): void | 100% (1/1) | 100% (6/6) | 100% (3/3) |
1 | package dmg.util ; |
2 | |
3 | public class Gate { |
4 | private boolean _isOpen = true ; |
5 | public Gate(){} |
6 | public Gate( boolean isOpen ){ |
7 | _isOpen = isOpen ; |
8 | } |
9 | public synchronized Object check(){ |
10 | while( true ){ |
11 | if( _isOpen )return this ; |
12 | try{ wait() ; }catch( Exception ee ){} ; |
13 | } |
14 | |
15 | } |
16 | public synchronized void open(){ |
17 | _isOpen = true ; |
18 | notifyAll() ; |
19 | } |
20 | public synchronized void close(){ |
21 | _isOpen = false ; |
22 | notifyAll() ; |
23 | } |
24 | |
25 | } |
[all classes][dmg.util] |
EMMA 2.0.5312 (C) Vladimir Roubtsov |