import net.pterodactylus.rhynodge.states.ComicState.Comic;
+import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.Lists;
/**
public class ComicState extends AbstractState implements Iterable<Comic> {
/** The comics in this state. */
- private List<Comic> comics = Lists.newArrayList();
+ @JsonProperty
+ private final List<Comic> comics = Lists.newArrayList();
/**
* Returns the list of comics contained in this state.
public static class Comic implements Iterable<String> {
/** The title of the comic. */
+ @JsonProperty
private final String title;
/** The URLs of the comic’s images. */
+ @JsonProperty
private final List<String> imageUrls = Lists.newArrayList();
/**
* @param title
* The title of the comic
*/
- public Comic(String title) {
+ public Comic(@JsonProperty("title") String title) {
this.title = title;
}
* @return The URLs of this comic’s images
*/
public List<String> imageUrls() {
- return imageUrls();
+ return imageUrls;
}
/**