/** * Copy constructor * * @param copy the contents to copy */ protected Contents(Contents copy) { contents = new StringBuffer(copy.getContents()); }
/** * Copy constructor * * @param copy the contents to copy */ protected Contents(Contents copy) { contents = new StringBuffer(copy.getContents()); }
/** * Retrieves a <code>String</code>ified * version of this object * * @return the header string */ public String toString() { StringBuffer hf = new StringBuffer(); if (!left.empty()) { hf.append(LEFT_ALIGN); hf.append(left.getContents()); } if (!centre.empty()) { hf.append(CENTRE); hf.append(centre.getContents()); } if (!right.empty()) { hf.append(RIGHT_ALIGN); hf.append(right.getContents()); } return hf.toString(); }
/** * Retrieves a <code>String</code>ified * version of this object * * @return the header string */ public String toString() { StringBuffer hf = new StringBuffer(); if (!left.empty()) { hf.append(LEFT_ALIGN); hf.append(left.getContents()); } if (!centre.empty()) { hf.append(CENTRE); hf.append(centre.getContents()); } if (!right.empty()) { hf.append(RIGHT_ALIGN); hf.append(right.getContents()); } return hf.toString(); }