EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.sensorframework.filter]

COVERAGE SUMMARY FOR SOURCE FILE [WarmupFilteredFactory.java]

nameclass, %method, %block, %line, %
WarmupFilteredFactory.java100% (1/1)12%  (1/8)25%  (15/60)31%  (4/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class WarmupFilteredFactory100% (1/1)12%  (1/8)25%  (15/60)31%  (4/13)
canFilter (Collection, Number): boolean 0%   (0/1)0%   (0/11)0%   (0/1)
convertToType (String): Long 0%   (0/1)0%   (0/4)0%   (0/1)
getFilterFactoryID (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getFilteredCollection (Collection): AbstractMeasurementsCollection 0%   (0/1)0%   (0/6)0%   (0/1)
getFilteredCollection (Collection, Number): AbstractMeasurementsCollection 0%   (0/1)0%   (0/15)0%   (0/2)
getProperties (): Properties 0%   (0/1)0%   (0/3)0%   (0/1)
setProperties (Properties): void 0%   (0/1)0%   (0/4)0%   (0/2)
WarmupFilteredFactory (): void 100% (1/1)100% (15/15)100% (4/4)

1package de.uka.ipd.sdq.sensorframework.filter;
2 
3import java.util.Collection;
4import java.util.Properties;
5 
6import de.uka.ipd.sdq.sensorframework.entities.Measurement;
7 
8public class WarmupFilteredFactory implements IFilteredCollectionFactory {
9 
10        /** The properties settings for this filtered collection */
11        protected Properties filterProperties = new Properties();
12 
13        /** The property "warm up". */
14        public static final String WARMUP = "Warm Up";
15        /** Default warm up to use. */
16        public static final long DEFAULT_WARMUP = 2500L;
17 
18        /**
19         * Initializes a new WarmupFilteredFactory without properties.
20         */
21        public WarmupFilteredFactory() {
22                filterProperties.put(WARMUP, DEFAULT_WARMUP);
23        }
24 
25        /** {@inheritDoc}
26         */
27        public AbstractMeasurementsCollection getFilteredCollection(
28                        Collection<Measurement> filtrate) {
29                return new WarmupFilteredCollection(filtrate, DEFAULT_WARMUP);
30        }
31 
32        /** {@inheritDoc}
33         */
34        public Properties getProperties() {
35                return filterProperties;
36        }
37 
38        /** {@inheritDoc}
39         */
40        public void setProperties(Properties newProperties) {
41                filterProperties = newProperties;
42        }
43 
44        /**
45         * {@inheritDoc}
46         */
47        public boolean canFilter(Collection<Measurement> filtrate,
48                        Number attribute) {
49                return attribute.longValue() < filtrate.size();
50        }
51 
52        /**
53         * {@inheritDoc}
54         */
55        public AbstractMeasurementsCollection getFilteredCollection(
56                        Collection<Measurement> filtrate, Number parameter) {
57                filterProperties.put(WARMUP, parameter.longValue());
58                return new WarmupFilteredCollection(filtrate, parameter.longValue());
59        }
60 
61        /**
62         * {@inheritDoc}
63         */
64        public String getFilterFactoryID() {
65                return "Warm Up Filter";
66        }
67 
68        /** {@inheritDoc}
69         */
70        public Long convertToType(String type) {
71                return Long.parseLong(type);
72        }
73}

[all classes][de.uka.ipd.sdq.sensorframework.filter]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov