Created
November 26, 2011 00:43
-
-
Save casidiablo/1394758 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.simpleframework.xml.*; | |
import java.util.List; | |
/** | |
* @author cristian | |
*/ | |
@Root(name = "response") | |
@Default(DefaultType.FIELD) | |
public class MediaVideoResponse { | |
@Element(name = "version") | |
private long version; | |
@ElementList(inline = true, name = "episodes", type = MediaVideo.class) | |
private List<MediaVideo> list; | |
public long getVersion() { | |
return version; | |
} | |
public void setVersion(long version) { | |
this.version = version; | |
} | |
public List<MediaVideo> getList() { | |
return list; | |
} | |
public void setList(List<MediaVideo> list) { | |
this.list = list; | |
} | |
@Override | |
public boolean equals(Object o) { | |
if (this == o) return true; | |
if (o == null || getClass() != o.getClass()) return false; | |
MediaVideoResponse response = (MediaVideoResponse) o; | |
if (version != response.version) return false; | |
if (list != null ? !list.equals(response.list) : response.list != null) return false; | |
return true; | |
} | |
@Override | |
public int hashCode() { | |
int result = (int) (version ^ (version >>> 32)); | |
result = 31 * result + (list != null ? list.hashCode() : 0); | |
return result; | |
} | |
@Override | |
public String toString() { | |
return "MediaVideoResponse{" + | |
"version=" + version + | |
", list=" + list + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment