private List<Paragraph> empty = new ArrayList<Paragraph>();
private long words;
+ /**
+ * Empty constructor, not to use.
+ */
+ @SuppressWarnings("unused")
+ private Chapter() {
+ // for serialisation purposes
+ }
+
/**
* Create a new {@link Chapter} with the given information.
*
/**
* Get an iterator on the {@link Paragraph}s.
*/
+ @Override
public Iterator<Paragraph> iterator() {
return paragraphs == null ? empty.iterator() : paragraphs.iterator();
}