Skip to content

Package: Path

Path

nameinstructionbranchcomplexitylinemethod
Path(Boolean, String)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
equals(Object)
M: 0 C: 21
100%
M: 1 C: 5
83%
M: 1 C: 3
75%
M: 0 C: 2
100%
M: 0 C: 1
100%
getValue()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
hashCode()
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
isRootfs()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
toString()
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /**
2: *
3: */
4: package model.packages;
5:
6: /**
7: * This class represents the data path.
8: *
9: * @author HFW410
10: *
11: */
12: public class Path {
13:         /**
14:          * String to the root file System.
15:          */
16:         private final Boolean rootfs;
17:         /**
18:          * value of the file.
19:          */
20:         private final String value;
21:
22:         /**
23:          * @param rootfs
24:          * as root file System.
25:          * @param value
26:          * as value of the file.
27:          */
28:         public Path(final Boolean rootfs, final String value) {
29:                 super();
30:                 this.rootfs = rootfs;
31:                 this.value = value;
32:         }
33:
34:         /**
35:          * @return the rootfs
36:          */
37:         public Boolean isRootfs() {
38:                 return this.rootfs;
39:         }
40:
41:         /**
42:          * @return the value
43:          */
44:         public String getValue() {
45:                 return this.value;
46:         }
47:
48:         @Override
49:         public int hashCode() {
50:                 return this.isRootfs().hashCode() + this.getValue().hashCode();
51:         }
52:
53:         @Override
54:         public boolean equals(final Object obj) {
55:•                return obj instanceof Path && ((Path) obj).isRootfs().equals(this.isRootfs())
56:•                                && ((Path) obj).getValue().equals(this.getValue());
57:         }
58:
59:         @Override
60:         public String toString() {
61:                 return this.isRootfs() + this.getValue();
62:         }
63: }