From a0b086c4c3bf2af6ee71cc8972fdbc75cbbcff6f Mon Sep 17 00:00:00 2001 From: Grzegorz Piwowarek Date: Wed, 10 Aug 2016 18:54:56 +0200 Subject: [PATCH] Refactor ActorGson --- .../org/baeldung/gson/entities/ActorGson.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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