EMMA Coverage Report (generated Sat Apr 14 15:01:05 EDT 2012)
[all classes][org.deduced.viewer.web.shared]

COVERAGE SUMMARY FOR SOURCE FILE [IgnoredEventInformation.java]

nameclass, %method, %block, %line, %
IgnoredEventInformation.java100% (1/1)57%  (4/7)72%  (31/43)60%  (7.8/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class IgnoredEventInformation100% (1/1)57%  (4/7)72%  (31/43)60%  (7.8/13)
getIgnoredCount (): int 0%   (0/1)0%   (0/3)0%   (0/1)
setIgnoredCount (int): void 0%   (0/1)0%   (0/4)0%   (0/2)
setIgnoredTimeStamp (long): void 0%   (0/1)0%   (0/4)0%   (0/2)
decrementIgnoredCount (): boolean 100% (1/1)94%  (15/16)95%  (2.8/3)
IgnoredEventInformation (): void 100% (1/1)100% (3/3)100% (1/1)
getIgnoredTimeStamp (): long 100% (1/1)100% (3/3)100% (1/1)
incrementIgnoredCount (): void 100% (1/1)100% (10/10)100% (3/3)

1/**
2 *    Copyright 2005-2011 Steve McDuff d-duff@users.sourceforge.net
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.deduced.viewer.web.shared;
17 
18/**
19 * 
20 * Ignored Event Information
21 * 
22 * @author Steve McDuff
23 * 
24 */
25public class IgnoredEventInformation
26{
27 
28        /**
29         * number of times to ignore this event
30         */
31        private int ignoredCount;
32 
33        /**
34         * time stamp of the last event to ignore
35         */
36        private long ignoredTimeStamp;
37 
38        /**
39         * get Ignored Count
40         * 
41         * @return the ignored count
42         */
43        public int getIgnoredCount()
44        {
45                return ignoredCount;
46        }
47 
48        /**
49         * get Ignored Time Stamp
50         * 
51         * @return the Ignored Time Stamp
52         */
53        public long getIgnoredTimeStamp()
54        {
55                return ignoredTimeStamp;
56        }
57 
58        /**
59         * set Ignored Count
60         * 
61         * @param setIgnoredCount the new ignored count
62         */
63        public void setIgnoredCount(
64                int setIgnoredCount)
65        {
66                ignoredCount = setIgnoredCount;
67        }
68 
69        /**
70         * set Ignored Time Stamp
71         * 
72         * @param setIgnoredTimeStamp the new Ignored Time Stamp
73         */
74        public void setIgnoredTimeStamp(
75                long setIgnoredTimeStamp)
76        {
77                ignoredTimeStamp = setIgnoredTimeStamp;
78        }
79 
80        /**
81         * increment Ignored Count and update the time stamp.
82         */
83        public void incrementIgnoredCount()
84        {
85                ++ignoredCount;
86 
87                ignoredTimeStamp = Utilities.getTimeStampInMilliseconds();
88        }
89 
90        /**
91         * decrement Ignored Count
92         * 
93         * @return true if the ignored count has reached zero
94         */
95        public boolean decrementIgnoredCount()
96        {
97                if (ignoredCount > 0)
98                {
99                        --ignoredCount;
100                }
101                return ignoredCount == 0;
102        }
103 
104}

[all classes][org.deduced.viewer.web.shared]
EMMA 2.0.9525 (unsupported private build) (C) Vladimir Roubtsov