diff --git a/gson/src/main/java/org/baeldung/gson/entities/ActorGson.java b/gson/src/main/java/org/baeldung/gson/entities/ActorGson.java index d2c0a8782cd1..20640cf347b2 100644 --- a/gson/src/main/java/org/baeldung/gson/entities/ActorGson.java +++ b/gson/src/main/java/org/baeldung/gson/entities/ActorGson.java @@ -5,15 +5,18 @@ public class ActorGson { - @Override - public String toString() { - return "ActorGson [imdbId=" + imdbId + ", dateOfBirth=" + dateOfBirth + ", filmography=" + filmography + "]"; - } - private String imdbId; private Date dateOfBirth; private List filmography; + public ActorGson(String imdbId, Date dateOfBirth, List filmography) { + super(); + this.imdbId = imdbId; + this.dateOfBirth = dateOfBirth; + this.filmography = filmography; + } + + public String getImdbId() { return imdbId; } @@ -38,11 +41,8 @@ public void setFilmography(List filmography) { this.filmography = filmography; } - public ActorGson(String imdbId, Date dateOfBirth, List filmography) { - super(); - this.imdbId = imdbId; - this.dateOfBirth = dateOfBirth; - this.filmography = filmography; + @Override + public String toString() { + return "ActorGson [imdbId=" + imdbId + ", dateOfBirth=" + dateOfBirth + ", filmography=" + filmography + "]"; } - } \ No newline at end of file