EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012) |
---|
[all classes][de.uka.ipd.sdq.probfunction.math.impl] |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
DefaultRandomGenerator.java | 100% (1/1) | 25% (1/4) | 38% (8/21) | 43% (3/7) |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
class DefaultRandomGenerator | 100% (1/1) | 25% (1/4) | 38% (8/21) | 43% (3/7) |
dispose (): void | 0% (0/1) | 0% (0/1) | 0% (0/1) | |
random (): double | 0% (0/1) | 0% (0/4) | 0% (0/1) | |
setSeed (Long): void | 0% (0/1) | 0% (0/8) | 0% (0/2) | |
DefaultRandomGenerator (): void | 100% (1/1) | 100% (8/8) | 100% (3/3) |
1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.probfunction.math.impl; |
5 | |
6 | import java.util.Random; |
7 | |
8 | import de.uka.ipd.sdq.probfunction.math.IRandomGenerator; |
9 | |
10 | /** |
11 | * @author Ihssane |
12 | * |
13 | */ |
14 | public class DefaultRandomGenerator implements IRandomGenerator { |
15 | |
16 | private Random randomGen; |
17 | |
18 | public void setSeed(Long seed) { |
19 | this.randomGen = new Random(seed); |
20 | } |
21 | |
22 | public DefaultRandomGenerator() { |
23 | this.randomGen = new Random(); |
24 | } |
25 | |
26 | public double random() { |
27 | return randomGen.nextDouble(); |
28 | } |
29 | |
30 | public void dispose() { } |
31 | |
32 | } |
[all classes][de.uka.ipd.sdq.probfunction.math.impl] |
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov |