• 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

8.57
/src/main/java/com/box/sdkgen/schemas/workflow/Workflow.java
1
package com.box.sdkgen.schemas.workflow;
2

3
import com.box.sdkgen.schemas.workflowmini.WorkflowMini;
4
import com.box.sdkgen.schemas.workflowmini.WorkflowMiniTypeField;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import java.util.List;
7
import java.util.Objects;
8

9
public class Workflow extends WorkflowMini {
10

11
  protected List<WorkflowFlowsField> flows;
12

13
  public Workflow() {
14
    super();
1✔
15
  }
1✔
16

17
  protected Workflow(Builder builder) {
18
    super(builder);
×
19
    this.flows = builder.flows;
×
20
  }
×
21

22
  public List<WorkflowFlowsField> getFlows() {
23
    return flows;
1✔
24
  }
25

26
  @Override
27
  public boolean equals(Object o) {
28
    if (this == o) {
×
29
      return true;
×
30
    }
31
    if (o == null || getClass() != o.getClass()) {
×
32
      return false;
×
33
    }
34
    Workflow casted = (Workflow) o;
×
35
    return Objects.equals(id, casted.id)
×
36
        && Objects.equals(type, casted.type)
×
37
        && Objects.equals(name, casted.name)
×
38
        && Objects.equals(description, casted.description)
×
39
        && Objects.equals(isEnabled, casted.isEnabled)
×
40
        && Objects.equals(flows, casted.flows);
×
41
  }
42

43
  @Override
44
  public int hashCode() {
45
    return Objects.hash(id, type, name, description, isEnabled, flows);
×
46
  }
47

48
  @Override
49
  public String toString() {
50
    return "Workflow{"
×
51
        + "id='"
52
        + id
53
        + '\''
54
        + ", "
55
        + "type='"
56
        + type
57
        + '\''
58
        + ", "
59
        + "name='"
60
        + name
61
        + '\''
62
        + ", "
63
        + "description='"
64
        + description
65
        + '\''
66
        + ", "
67
        + "isEnabled='"
68
        + isEnabled
69
        + '\''
70
        + ", "
71
        + "flows='"
72
        + flows
73
        + '\''
74
        + "}";
75
  }
76

NEW
77
  public static class Builder extends WorkflowMini.Builder {
×
78

79
    protected List<WorkflowFlowsField> flows;
80

81
    public Builder flows(List<WorkflowFlowsField> flows) {
82
      this.flows = flows;
×
83
      return this;
×
84
    }
85

86
    @Override
87
    public Builder id(String id) {
88
      this.id = id;
×
89
      return this;
×
90
    }
91

92
    @Override
93
    public Builder type(WorkflowMiniTypeField type) {
94
      this.type = new EnumWrapper<WorkflowMiniTypeField>(type);
×
95
      return this;
×
96
    }
97

98
    @Override
99
    public Builder type(EnumWrapper<WorkflowMiniTypeField> type) {
100
      this.type = type;
×
101
      return this;
×
102
    }
103

104
    @Override
105
    public Builder name(String name) {
106
      this.name = name;
×
107
      return this;
×
108
    }
109

110
    @Override
111
    public Builder description(String description) {
112
      this.description = description;
×
113
      return this;
×
114
    }
115

116
    @Override
117
    public Builder isEnabled(Boolean isEnabled) {
118
      this.isEnabled = isEnabled;
×
119
      return this;
×
120
    }
121

122
    public Workflow build() {
123
      return new Workflow(this);
×
124
    }
125
  }
126
}
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