Skip to content

Package: DiffIdentifier

DiffIdentifier

nameinstructionbranchcomplexitylinemethod
DiffIdentifier(String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
equals(Object)
M: 11 C: 26
70%
M: 6 C: 6
50%
M: 5 C: 2
29%
M: 5 C: 8
62%
M: 0 C: 1
100%
getName()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hashCode()
M: 2 C: 17
89%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 5
100%
M: 0 C: 1
100%
toString()
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package migration.difffile.objects;
2:
3: public class DiffIdentifier {
4:         /**
5:          * the name of Difference.
6:          */
7:         final String name;
8:
9:         public DiffIdentifier(String name) {
10:                 super();
11:                 this.name = name;
12:         }
13:
14:         /**
15:          * @return the name
16:          */
17:         public String getName() {
18:                 return name;
19:         }
20:
21:         @Override
22:         public String toString() {
23:                 return "DiffIdentifier [name=" + name + "]";
24:         }
25:
26:         @Override
27:         public int hashCode() {
28:                 final int prime = 31;
29:                 int result = 1;
30:•                result = prime * result + ((name == null)
31:                                 ? 0
32:                                 : name.hashCode());
33:                 return result;
34:         }
35:
36:         @Override
37:         public boolean equals(final Object obj) {
38:•                if (this == obj) {
39:                         return true;
40:                 }
41:•                if (obj == null) {
42:                         return false;
43:                 }
44:•                if (getClass() != obj.getClass()) {
45:                         return false;
46:                 }
47:                 final DiffIdentifier other = (DiffIdentifier) obj;
48:•                if (name == null) {
49:•                        if (other.name != null) {
50:                                 return false;
51:                         }
52:•                } else if (!name.equals(other.name)) {
53:                         return false;
54:                 }
55:                 return true;
56:         }
57:
58: }