• 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.33
/src/main/java/com/box/sdkgen/schemas/items/ItemsOrderField.java
1
package com.box.sdkgen.schemas.items;
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 ItemsOrderField extends SerializableObject {
10

11
  protected String by;
12

13
  @JsonDeserialize(using = ItemsOrderDirectionField.ItemsOrderDirectionFieldDeserializer.class)
14
  @JsonSerialize(using = ItemsOrderDirectionField.ItemsOrderDirectionFieldSerializer.class)
15
  protected EnumWrapper<ItemsOrderDirectionField> direction;
16

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

21
  protected ItemsOrderField(Builder builder) {
22
    super();
×
23
    this.by = builder.by;
×
24
    this.direction = builder.direction;
×
25
  }
×
26

27
  public String getBy() {
28
    return by;
×
29
  }
30

31
  public EnumWrapper<ItemsOrderDirectionField> getDirection() {
32
    return direction;
×
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
    ItemsOrderField casted = (ItemsOrderField) o;
×
44
    return Objects.equals(by, casted.by) && Objects.equals(direction, casted.direction);
×
45
  }
46

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

52
  @Override
53
  public String toString() {
54
    return "ItemsOrderField{" + "by='" + by + '\'' + ", " + "direction='" + direction + '\'' + "}";
×
55
  }
56

NEW
57
  public static class Builder {
×
58

59
    protected String by;
60

61
    protected EnumWrapper<ItemsOrderDirectionField> direction;
62

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

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

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

78
    public ItemsOrderField build() {
79
      return new ItemsOrderField(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