*
* @author niki
*/
-public class Paragraph {
+public class Paragraph implements Cloneable {
/**
* A paragraph type, that will dictate how the paragraph will be handled.
*
public String toString() {
return String.format("%s: [%s]", "" + type, "" + content);
}
+
+ @Override
+ public Paragraph clone() {
+ Paragraph para = null;
+ try {
+ para = (Paragraph) super.clone();
+ } catch (CloneNotSupportedException e) {
+ // Did the clones rebel?
+ System.err.println(e);
+ }
+
+ return para;
+ }
}