Skip to content

Instantly share code, notes, and snippets.

@naturalwarren
Last active May 26, 2017 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naturalwarren/7dda1d297c8f558b058645259d4440b5 to your computer and use it in GitHub Desktop.
Save naturalwarren/7dda1d297c8f558b058645259d4440b5 to your computer and use it in GitHub Desktop.
Rider Model with Nullness Annotations
public class Rider {
@NonNull private String firstName;
@NonNull private String lastName;
public Rider(@NonNull String firstname, @NonNull String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
@NonNull
public String firstName() {
return firstName;
}
@NonNull
public String lastName() {
return lastName;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment