1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.surefire.api.util.internal;
20
21 import java.util.Objects;
22
23 import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank;
24
25
26
27
28 public final class ClassMethod {
29 private final String clazz;
30
31 private final String method;
32
33 public ClassMethod(String clazz, String method) {
34 this.clazz = clazz;
35 this.method = method;
36 }
37
38 public boolean isValidTest() {
39 return !isBlank(clazz) && !isBlank(method);
40 }
41
42 public String getClazz() {
43 return clazz;
44 }
45
46 public String getMethod() {
47 return method;
48 }
49
50 @Override
51 public boolean equals(Object o) {
52 if (this == o) {
53 return true;
54 }
55 if (o == null || getClass() != o.getClass()) {
56 return false;
57 }
58 ClassMethod that = (ClassMethod) o;
59 return Objects.equals(clazz, that.clazz) && Objects.equals(method, that.method);
60 }
61
62 @Override
63 public int hashCode() {
64 return Objects.hash(clazz, method);
65 }
66 }