Skip to content

Package: Pair

Pair

nameinstructionbranchcomplexitylinemethod
Pair(Object, Object)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getFirst()
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%
getSecond()
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%
toString()
M: 17 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 cz.cvut.kbss.jopa.datatype.util;
2:
3: import java.util.AbstractMap;
4:
5: /**
6: * Represents an ordered pair of values.
7: *
8: * @param <F> Type of the first value in the pair
9: * @param <S> Type of the second value in the pair
10: */
11: public final class Pair<F, S> extends AbstractMap.SimpleEntry<F, S> {
12:
13: public Pair(F first, S second) {
14: super(first, second);
15: }
16:
17: public F getFirst() {
18: return getKey();
19: }
20:
21: public S getSecond() {
22: return getValue();
23: }
24:
25: @Override
26: public String toString() {
27: return "(" + getFirst() + ", " + getSecond() + ")";
28: }
29: }