+ return title().equals(comic.title()) && strips().equals(comic.strips());
+ }
+
+ @Override
+ public String toString() {
+ return String.format("Comic[title=%s,strips=%s]", title(), strips());
+ }
+
+ }
+
+ /**
+ * A strip is a single image that belongs to a comic.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+ public static class Strip {
+
+ /** The URL of the image. */
+ @JsonProperty
+ private final String imageUrl;
+
+ /** The comment of the image. */
+ @JsonProperty
+ private final String comment;
+
+ /**
+ * Creates a new strip.
+ *
+ * @param imageUrl
+ * The URL of the image
+ * @param comment
+ * The comment of the image
+ */
+ public Strip(@JsonProperty("imageUrl") String imageUrl, @JsonProperty("comment") String comment) {
+ this.imageUrl = imageUrl;
+ this.comment = comment;
+ }
+
+ /**
+ * Returns the URL of the image.
+ *
+ * @return The URL of the image
+ */
+ public String imageUrl() {
+ return imageUrl;
+ }
+
+ /**
+ * Returns the comment of the image.
+ *
+ * @return The comment of the image
+ */
+ public String comment() {
+ return comment;
+ }
+
+ //
+ // OBJECT METHODS
+ //
+
+ @Override
+ public int hashCode() {
+ return imageUrl().hashCode() ^ comment().hashCode();
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (!(object instanceof Strip)) {
+ return false;
+ }
+ Strip strip = (Strip) object;
+ return imageUrl().equals(strip.imageUrl()) && comment().equals(strip.comment());