• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

link-intersystems / lis-commons / #295

06 Nov 2023 09:54AM UTC coverage: 89.092% (-1.0%) from 90.072%
#295

Pull #7

renelink
Run build with xvfb to support swing tests.
Pull Request #7: Migrated swing-view stuff from java-swing-mvc-plugin-architecture.

318 of 451 new or added lines in 28 files covered. (70.51%)

8029 of 9012 relevant lines covered (89.09%)

0.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

52.38
/lis-commons-util-context/src/main/java/com/link_intersystems/util/context/ObjectQualifier.java
1
package com.link_intersystems.util.context;
2

3
import java.util.Objects;
4

5
import static java.util.Objects.requireNonNull;
6

7
public class ObjectQualifier<T> {
8

9
    private Class<T> type;
10
    private String name;
11

12
    public ObjectQualifier(Class<T> type) {
NEW
13
        this(type, null);
×
NEW
14
    }
×
15

16
    public ObjectQualifier(Class<T> type, String name) {
1✔
17
        this.type = requireNonNull(type);
1✔
18
        this.name = name;
1✔
19
    }
1✔
20

21
    public String getName() {
22
        return name;
1✔
23
    }
24

25
    public Class<T> getType() {
26
        return type;
1✔
27
    }
28

29
    @Override
30
    public boolean equals(Object o) {
31
        if (this == o) return true;
1✔
32
        if (o == null || getClass() != o.getClass()) return false;
1✔
33
        ObjectQualifier<?> that = (ObjectQualifier<?>) o;
1✔
34
        return Objects.equals(getType(), that.getType()) && Objects.equals(getName(), that.getName());
1✔
35
    }
36

37
    @Override
38
    public int hashCode() {
39
        return Objects.hash(getType(), getName());
1✔
40
    }
41

42
    @Override
43
    public String toString() {
NEW
44
        StringBuilder sb = new StringBuilder();
×
NEW
45
        sb.append(getType().getName());
×
46

NEW
47
        String name = getName();
×
NEW
48
        if (name != null) {
×
NEW
49
            sb.append("['");
×
NEW
50
            sb.append(getName());
×
NEW
51
            sb.append("']");
×
52
        }
53

NEW
54
        return sb.toString();
×
55
    }
56
}
57

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc