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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

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

11.11
/src/main/java/com/box/sdkgen/schemas/uploadpart/UploadPart.java
1
package com.box.sdkgen.schemas.uploadpart;
2

3
import com.box.sdkgen.schemas.uploadpartmini.UploadPartMini;
4
import java.util.Objects;
5

6
public class UploadPart extends UploadPartMini {
7

8
  protected String sha1;
9

10
  public UploadPart() {
11
    super();
1✔
12
  }
1✔
13

14
  protected UploadPart(Builder builder) {
15
    super(builder);
×
16
    this.sha1 = builder.sha1;
×
17
  }
×
18

19
  public String getSha1() {
20
    return sha1;
1✔
21
  }
22

23
  @Override
24
  public boolean equals(Object o) {
25
    if (this == o) {
×
26
      return true;
×
27
    }
28
    if (o == null || getClass() != o.getClass()) {
×
29
      return false;
×
30
    }
31
    UploadPart casted = (UploadPart) o;
×
32
    return Objects.equals(partId, casted.partId)
×
33
        && Objects.equals(offset, casted.offset)
×
34
        && Objects.equals(size, casted.size)
×
35
        && Objects.equals(sha1, casted.sha1);
×
36
  }
37

38
  @Override
39
  public int hashCode() {
40
    return Objects.hash(partId, offset, size, sha1);
×
41
  }
42

43
  @Override
44
  public String toString() {
45
    return "UploadPart{"
×
46
        + "partId='"
47
        + partId
48
        + '\''
49
        + ", "
50
        + "offset='"
51
        + offset
52
        + '\''
53
        + ", "
54
        + "size='"
55
        + size
56
        + '\''
57
        + ", "
58
        + "sha1='"
59
        + sha1
60
        + '\''
61
        + "}";
62
  }
63

NEW
64
  public static class Builder extends UploadPartMini.Builder {
×
65

66
    protected String sha1;
67

68
    public Builder sha1(String sha1) {
69
      this.sha1 = sha1;
×
70
      return this;
×
71
    }
72

73
    @Override
74
    public Builder partId(String partId) {
75
      this.partId = partId;
×
76
      return this;
×
77
    }
78

79
    @Override
80
    public Builder offset(Long offset) {
81
      this.offset = offset;
×
82
      return this;
×
83
    }
84

85
    @Override
86
    public Builder size(Long size) {
87
      this.size = size;
×
88
      return this;
×
89
    }
90

91
    public UploadPart build() {
92
      return new UploadPart(this);
×
93
    }
94
  }
95
}
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