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

coditory / quark-uri / #3

pending completion
#3

push

github-actions

ogesaku
init

1212 of 1212 new or added lines in 21 files covered. (100.0%)

926 of 1212 relevant lines covered (76.4%)

0.76 hits per line

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

68.75
/src/main/java/com/coditory/quark/uri/Strings.java
1
package com.coditory.quark.uri;
2

3
import java.util.Locale;
4

5
import static com.coditory.quark.uri.Preconditions.expectNonNull;
6

7
final class Strings {
8
    private Strings() {
×
9
        throw new UnsupportedOperationException("Do not instantiate utility class");
×
10
    }
11

12
    static boolean isNullOrEmpty(String text) {
13
        return text == null || text.isEmpty();
1✔
14
    }
15

16
    static boolean isNotNullOrEmpty(String text) {
17
        return !isNullOrEmpty(text);
1✔
18
    }
19

20
    static boolean isNullOrBlank(String text) {
21
        return text == null || text.isBlank();
1✔
22
    }
23

24
    static boolean isNotNullOrBlank(String text) {
25
        return !isNullOrBlank(text);
1✔
26
    }
27

28
    static String emptyToNull(String text) {
29
        return text == null || text.isEmpty()
1✔
30
                ? null
1✔
31
                : text;
1✔
32
    }
33

34
    static String blankToNull(String text) {
35
        return text == null || text.isBlank()
×
36
                ? null
×
37
                : text;
×
38
    }
39

40
    static String lowerCase(String text) {
41
        expectNonNull(text, "text");
1✔
42
        return text.toLowerCase(Locale.ROOT);
1✔
43
    }
44

45
    public static boolean containsWhitespace(String text) {
46
        expectNonNull(text, "text");
1✔
47
        return text.codePoints().anyMatch(Character::isWhitespace);
1✔
48
    }
49
}
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

© 2025 Coveralls, Inc