• 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

0.0
/src/main/java/com/box/sdkgen/schemas/trackingcode/TrackingCode.java
1
package com.box.sdkgen.schemas.trackingcode;
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 TrackingCode extends SerializableObject {
10

11
  @JsonDeserialize(using = TrackingCodeTypeField.TrackingCodeTypeFieldDeserializer.class)
12
  @JsonSerialize(using = TrackingCodeTypeField.TrackingCodeTypeFieldSerializer.class)
13
  protected EnumWrapper<TrackingCodeTypeField> type;
14

15
  protected String name;
16

17
  protected String value;
18

19
  public TrackingCode() {
20
    super();
×
21
  }
×
22

23
  protected TrackingCode(Builder builder) {
24
    super();
×
25
    this.type = builder.type;
×
26
    this.name = builder.name;
×
27
    this.value = builder.value;
×
28
  }
×
29

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

34
  public String getName() {
35
    return name;
×
36
  }
37

38
  public String getValue() {
39
    return value;
×
40
  }
41

42
  @Override
43
  public boolean equals(Object o) {
44
    if (this == o) {
×
45
      return true;
×
46
    }
47
    if (o == null || getClass() != o.getClass()) {
×
48
      return false;
×
49
    }
50
    TrackingCode casted = (TrackingCode) o;
×
51
    return Objects.equals(type, casted.type)
×
52
        && Objects.equals(name, casted.name)
×
53
        && Objects.equals(value, casted.value);
×
54
  }
55

56
  @Override
57
  public int hashCode() {
58
    return Objects.hash(type, name, value);
×
59
  }
60

61
  @Override
62
  public String toString() {
63
    return "TrackingCode{"
×
64
        + "type='"
65
        + type
66
        + '\''
67
        + ", "
68
        + "name='"
69
        + name
70
        + '\''
71
        + ", "
72
        + "value='"
73
        + value
74
        + '\''
75
        + "}";
76
  }
77

NEW
78
  public static class Builder {
×
79

80
    protected EnumWrapper<TrackingCodeTypeField> type;
81

82
    protected String name;
83

84
    protected String value;
85

86
    public Builder type(TrackingCodeTypeField type) {
87
      this.type = new EnumWrapper<TrackingCodeTypeField>(type);
×
88
      return this;
×
89
    }
90

91
    public Builder type(EnumWrapper<TrackingCodeTypeField> type) {
92
      this.type = type;
×
93
      return this;
×
94
    }
95

96
    public Builder name(String name) {
97
      this.name = name;
×
98
      return this;
×
99
    }
100

101
    public Builder value(String value) {
102
      this.value = value;
×
103
      return this;
×
104
    }
105

106
    public TrackingCode build() {
107
      return new TrackingCode(this);
×
108
    }
109
  }
110
}
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