• 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

12.5
/src/main/java/com/box/sdkgen/schemas/commentbase/CommentBase.java
1
package com.box.sdkgen.schemas.commentbase;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.serialization.json.EnumWrapper;
5
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
7
import java.util.Objects;
8

9
public class CommentBase extends SerializableObject {
10

11
  protected String id;
12

13
  @JsonDeserialize(using = CommentBaseTypeField.CommentBaseTypeFieldDeserializer.class)
14
  @JsonSerialize(using = CommentBaseTypeField.CommentBaseTypeFieldSerializer.class)
15
  protected EnumWrapper<CommentBaseTypeField> type;
16

17
  public CommentBase() {
18
    super();
1✔
19
  }
1✔
20

21
  protected CommentBase(Builder builder) {
22
    super();
×
23
    this.id = builder.id;
×
24
    this.type = builder.type;
×
25
  }
×
26

27
  public String getId() {
28
    return id;
1✔
29
  }
30

31
  public EnumWrapper<CommentBaseTypeField> getType() {
32
    return type;
×
33
  }
34

35
  @Override
36
  public boolean equals(Object o) {
37
    if (this == o) {
×
38
      return true;
×
39
    }
40
    if (o == null || getClass() != o.getClass()) {
×
41
      return false;
×
42
    }
43
    CommentBase casted = (CommentBase) o;
×
44
    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
×
45
  }
46

47
  @Override
48
  public int hashCode() {
49
    return Objects.hash(id, type);
×
50
  }
51

52
  @Override
53
  public String toString() {
54
    return "CommentBase{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
×
55
  }
56

NEW
57
  public static class Builder {
×
58

59
    protected String id;
60

61
    protected EnumWrapper<CommentBaseTypeField> type;
62

63
    public Builder id(String id) {
64
      this.id = id;
×
65
      return this;
×
66
    }
67

68
    public Builder type(CommentBaseTypeField type) {
69
      this.type = new EnumWrapper<CommentBaseTypeField>(type);
×
70
      return this;
×
71
    }
72

73
    public Builder type(EnumWrapper<CommentBaseTypeField> type) {
74
      this.type = type;
×
75
      return this;
×
76
    }
77

78
    public CommentBase build() {
79
      return new CommentBase(this);
×
80
    }
81
  }
82
}
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