/* * Copyright (c) 2004-2016 Stuart Boston * * This file is part of TheMovieDB API. * * TheMovieDB API is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * TheMovieDB API is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>. * */ package com.omertron.omdbapi; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; public class TestID { private String title; private int year; private String imdb; private String other; /** * Default constructor with NO data */ private TestID() { this("", ""); } /** * Constructor with name and IMDB ID * * @param name * @param imdb */ public TestID(String name, String imdb) { this(name, 0, imdb, ""); } /** * Constructor with name, year and IMDB ID * * @param name * @param year * @param imdb */ public TestID(String name, int year, String imdb) { this(name, year, imdb, ""); } /** * Constructor with all values * * @param name * @param year * @param imdb * @param other */ public TestID(String name, int year, String imdb, String other) { this.title = name; this.year = year; this.imdb = imdb; this.other = other; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } public String getImdb() { return imdb; } public void setImdb(String imdb) { this.imdb = imdb; } public String getOther() { return other; } public void setOther(String other) { this.other = other; } @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); } }