public class Paragraph extends Object
Represents a paragraph, made of lines. The whole paragraph has a limit for the line length. Words can be added, the class will reformat the paragraph according to max. line length.
Constructor and Description |
---|
Paragraph(int lineLength)
Constructs an HtmlParagraph with a specified maximum line length.
|
Modifier and Type | Method and Description |
---|---|
void |
appendText(String text)
Appends a bunch of words to the paragraph.
|
void |
appendWord(String word)
Appends another word to this paragraph.
|
Collection<String> |
getLines()
Returns the lines in this paragraph.
|
String |
toString() |
public Paragraph(int lineLength)
Constructs an HtmlParagraph with a specified maximum line length.
lineLength
- maximum line lengthpublic void appendWord(String word)
Appends another word to this paragraph.
word
- the wordpublic void appendText(String text)
Appends a bunch of words to the paragraph.
text
- the text to add to the paragraphpublic Collection<String> getLines()
Returns the lines in this paragraph.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2014 AndroMDA.org. All rights reserved.