private String content;
private long words;
+ /**
+ * Empty constructor, not to use.
+ */
+ @SuppressWarnings("unused")
+ private Paragraph() {
+ // for serialisation purposes
+ }
+
/**
* Create a new {@link Paragraph} with the given image.
*
* the image as an URL
*/
public Paragraph(URL imageUrl) {
- this(ParagraphType.IMAGE, imageUrl.toString(), 0);
+ this(ParagraphType.IMAGE, imageUrl.toString(), 1);
}
/**
* @param content
* the content of this paragraph
* @param words
- * the number of words
+ * the number of words (or images)
*/
public Paragraph(ParagraphType type, String content, long words) {
this.type = type;
}
/**
- * The number of words in this {@link Paragraph}.
+ * The number of words (or images) in this {@link Paragraph}.
*
* @return the number of words
*/
}
/**
- * The number of words in this {@link Paragraph}.
+ * The number of words (or images) in this {@link Paragraph}.
*
* @param words
* the number of words to set