Skip to content

Package: DiffOtherContent

DiffOtherContent

nameinstructionbranchcomplexitylinemethod
DiffOtherContent(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: 37 C: 0
0%
M: 12 C: 0
0%
M: 7 C: 0
0%
M: 13 C: 0
0%
M: 1 C: 0
0%
getContent()
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%
hasSameContent(DiffFileEntity)
M: 4 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: 19 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
toString()
M: 10 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: /**
4: * Klassifizierung von nicht zuordbaren Inhalten.
5: *
6: * @author Jan Schering
7: *
8: */
9: public class DiffOtherContent implements DiffFileEntity {
10:
11:         /**
12:          * the content of the line.
13:          */
14:         private final String content;
15:
16:         /**
17:          * Creates a DiffOtherContent with the given content.
18:          *
19:          * @param content
20:          * the content
21:          */
22:         public DiffOtherContent(final String content) {
23:                 this.content = content;
24:         }
25:
26:         /**
27:          * @return the content
28:          */
29:         public String getContent() {
30:                 return content;
31:         }
32:
33:         @Override
34:         public String toString() {
35:                 return "Content: " + this.content;
36:         }
37:
38:         @Override
39:         public int hashCode() {
40:                 final int prime = 31;
41:                 int result = 1;
42:•                result = prime * result + ((content == null)
43:                                 ? 0
44:                                 : content.hashCode());
45:                 return result;
46:         }
47:
48:         @Override
49:         public boolean equals(final Object obj) {
50:•                if (this == obj) {
51:                         return true;
52:                 }
53:•                if (obj == null) {
54:                         return false;
55:                 }
56:•                if (getClass() != obj.getClass()) {
57:                         return false;
58:                 }
59:                 final DiffOtherContent other = (DiffOtherContent) obj;
60:•                if (content == null) {
61:•                        if (other.content != null) {
62:                                 return false;
63:                         }
64:•                } else if (!content.equals(other.content)) {
65:                         return false;
66:                 }
67:                 return true;
68:         }
69:
70:         @Override
71:         public boolean hasSameContent(final DiffFileEntity line) {
72:                 return this.equals(line);
73:         }
74:
75: }