From f4f64b59628f17f4db68352d1b3786cf89ce56fc Mon Sep 17 00:00:00 2001 From: Omertron Date: Thu, 7 Oct 2010 10:32:16 +0000 Subject: [PATCH] Added a method to return a single country --- .../com/moviejukebox/themoviedb/model/MovieDB.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/themoviedbapi/src/com/moviejukebox/themoviedb/model/MovieDB.java b/themoviedbapi/src/com/moviejukebox/themoviedb/model/MovieDB.java index 18efa4e5c..2a60da8e4 100644 --- a/themoviedbapi/src/com/moviejukebox/themoviedb/model/MovieDB.java +++ b/themoviedbapi/src/com/moviejukebox/themoviedb/model/MovieDB.java @@ -54,6 +54,18 @@ public class MovieDB extends ModelTools { private List people = new ArrayList(); private List artwork = new ArrayList(); + /** + * Just return the first country + * @return + */ + public String getCountry() { + if (!countries.isEmpty()) { + Country country = countries.get(0); + return country.getName(); + } + return UNKNOWN; + } + public String getPopularity() { return popularity; }