• 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/collections/CollectionsOrderField.java
1
package com.box.sdkgen.schemas.collections;
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 CollectionsOrderField extends SerializableObject {
10

11
  protected String by;
12

13
  @JsonDeserialize(
14
      using = CollectionsOrderDirectionField.CollectionsOrderDirectionFieldDeserializer.class)
15
  @JsonSerialize(
16
      using = CollectionsOrderDirectionField.CollectionsOrderDirectionFieldSerializer.class)
17
  protected EnumWrapper<CollectionsOrderDirectionField> direction;
18

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

23
  protected CollectionsOrderField(Builder builder) {
24
    super();
×
25
    this.by = builder.by;
×
26
    this.direction = builder.direction;
×
27
  }
×
28

29
  public String getBy() {
30
    return by;
×
31
  }
32

33
  public EnumWrapper<CollectionsOrderDirectionField> getDirection() {
34
    return direction;
×
35
  }
36

37
  @Override
38
  public boolean equals(Object o) {
39
    if (this == o) {
×
40
      return true;
×
41
    }
42
    if (o == null || getClass() != o.getClass()) {
×
43
      return false;
×
44
    }
45
    CollectionsOrderField casted = (CollectionsOrderField) o;
×
46
    return Objects.equals(by, casted.by) && Objects.equals(direction, casted.direction);
×
47
  }
48

49
  @Override
50
  public int hashCode() {
51
    return Objects.hash(by, direction);
×
52
  }
53

54
  @Override
55
  public String toString() {
56
    return "CollectionsOrderField{"
×
57
        + "by='"
58
        + by
59
        + '\''
60
        + ", "
61
        + "direction='"
62
        + direction
63
        + '\''
64
        + "}";
65
  }
66

NEW
67
  public static class Builder {
×
68

69
    protected String by;
70

71
    protected EnumWrapper<CollectionsOrderDirectionField> direction;
72

73
    public Builder by(String by) {
74
      this.by = by;
×
75
      return this;
×
76
    }
77

78
    public Builder direction(CollectionsOrderDirectionField direction) {
79
      this.direction = new EnumWrapper<CollectionsOrderDirectionField>(direction);
×
80
      return this;
×
81
    }
82

83
    public Builder direction(EnumWrapper<CollectionsOrderDirectionField> direction) {
UNCOV
84
      this.direction = direction;
×
85
      return this;
×
86
    }
87

88
    public CollectionsOrderField build() {
89
      return new CollectionsOrderField(this);
×
90
    }
91
  }
92
}
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