org.andromda.core.common
Class Paragraph

java.lang.Object
  extended by org.andromda.core.common.Paragraph

public class Paragraph
extends java.lang.Object

A utility object useful for formatting paragraph output.

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.

Author:
Matthias Bohlen, Chad Brandon

Constructor Summary
Paragraph(int lineLength)
          

Constructs an HtmlParagraph with a specified maximum line length.

 
Method Summary
 void appendText(java.lang.String text)
          

Appends a bunch of words to the paragraph.

 void appendWord(java.lang.String word)
          

Appends another word to this paragraph.

 java.util.Collection getLines()
          

Returns the lines in this paragraph.

 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Paragraph

public Paragraph(int lineLength)

Constructs an HtmlParagraph with a specified maximum line length.

Parameters:
lineLength - maximum line length
Method Detail

appendWord

public void appendWord(java.lang.String word)

Appends another word to this paragraph.

Parameters:
word - the word

appendText

public void appendText(java.lang.String text)

Appends a bunch of words to the paragraph.

Parameters:
text - the text to add to the paragraph

getLines

public java.util.Collection getLines()

Returns the lines in this paragraph.

Returns:
Collection the lines as collection of Strings

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.