Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make model constructors more consistent #441

Closed
cammace opened this issue Apr 15, 2017 · 1 comment
Closed

Make model constructors more consistent #441

cammace opened this issue Apr 15, 2017 · 1 comment
Labels

Comments

@cammace
Copy link

cammace commented Apr 15, 2017

We provide constructors for many of our API model classes but the parameters taken in are wildly inconsistent. For example the StepManeuver class provides two constructors:

public StepManeuver() {
  }

  public StepManeuver(String type, String modifier, Integer exit) {
    this.type = type;
    this.modifier = modifier;
    this.exit = exit;
  }

but we don't have constructors for location, bearingBefore, bearingAfter, or instruction variables. Can we get away with only having empty constructors since we now have setters for all variables @zugaldia?

@cammace
Copy link
Author

cammace commented Oct 30, 2017

AutoValue classes in 3.0 resolve this issue. Closing

@cammace cammace closed this as completed Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant