EMMA Coverage Report (generated Tue Dec 18 20:38:46 CET 2007)
[all classes][cz.vutbr.feec.packets.rtcp]

## COVERAGE SUMMARY FOR SOURCE FILE [ReportPacket.java]

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
ReportPacket.java | 100% (1/1) | 71% (5/7) | 44% (28/63) | 56% (9/16)

### COVERAGE BREAKDOWN BY CLASS AND METHOD

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
class ReportPacket | 100% (1/1) | 71% (5/7) | 44% (28/63) | 56% (9/16)
equals (Object): boolean |  | 0% (0/1) | 0% (0/22) | 0% (0/5)
hashCode (): int |  | 0% (0/1) | 0% (0/13) | 0% (0/2)
ReportPacket (): void |  | 100% (1/1) | 100% (8/8) | 100% (3/3)
addReportBlock (ReportBlock): void |  | 100% (1/1) | 100% (6/6) | 100% (2/2)
getReportBlock (int): ReportBlock |  | 100% (1/1) | 100% (6/6) | 100% (1/1)
getReportCount (): int |  | 100% (1/1) | 100% (4/4) | 100% (1/1)
setReportCount (int): void |  | 100% (1/1) | 100% (4/4) | 100% (2/2)

1 | package cz.vutbr.feec.packets.rtcp;
2 |
3 | import java.util.Vector;
4 | import org.apache.commons.lang.builder.EqualsBuilder;
5 | import org.apache.commons.lang.builder.HashCodeBuilder;
6 |
7 | public abstract class ReportPacket extends GeneralRTCPHeader {
8 |
9 | protected Vector<ReportBlock> reportBlockList = new Vector<ReportBlock>();
10 |
11 | public ReportPacket() {
12 | super();
13 | }
14 |
15 | public void addReportBlock(ReportBlock block) {
16 | reportBlockList.add(block);
17 | }
18 |
19 | @Override
20 | protected void setReportCount(int reportCount) {
21 | super.setReportCount(reportCount);
22 | // throw new RuntimeException("Do not use this method. This metod is set "
23 | // + "automaticaly according to number of added chunks.");
24 | }
25 |
26 | @Override
27 | public int getReportCount() {
28 | return reportBlockList.size();
29 | }
30 |
31 | public ReportBlock getReportBlock(int index) {
32 | return reportBlockList.get(index);
33 | }
34 |
35 | /**
36 | * @see java.lang.Object#equals(Object)
37 | */
38 | public boolean equals(Object object) {
39 | if (!(object instanceof ReportPacket)) {
40 | return false;
41 | }
42 | ReportPacket rhs = (ReportPacket) object;
43 | return new EqualsBuilder().appendSuper(super.equals(object)).append(
44 | this.reportBlockList, rhs.reportBlockList).isEquals();
45 | }
46 |
47 | /**
48 | * @see java.lang.Object#hashCode()
49 | */
50 | public int hashCode() {
51 | return new HashCodeBuilder(300235697, 2041011175).append(this.reportCount).append(
52 | this.reportBlockList).toHashCode();
53 | }
54 |
55 | }

[all classes][cz.vutbr.feec.packets.rtcp]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov