All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class ORG.opengroup.misc.Line

java.lang.Object
    |
    +----ORG.opengroup.misc.Line

public class Line
extends Object
implements Enumeration
A structure tp process a multi-line string


Constructor Index

 o Line(String)
Analyze a multi-line string.

Method Index

 o getHeight()
Returns the number of lines in the string.
 o getWidth()
Returns the number of characters in the longest line.
 o hasMoreElements()
Returns true if there is another line.
 o nextElement()
Returns the next line.

Constructors

 o Line
public Line(String multi)
Analyze a multi-line string. Carrage returns are ignored; only line feeds ('\n') are significant.

Parameters:
multi - The multi-line string or null.

Methods

 o getHeight
public int getHeight()
Returns the number of lines in the string. Returns 0 only if null was passed to the constructor. Returns 1 only if there were no line feeds passed to the constructor.

 o getWidth
public int getWidth()
Returns the number of characters in the longest line.

 o hasMoreElements
public boolean hasMoreElements()
Returns true if there is another line.

 o nextElement
public Object nextElement()
Returns the next line. (Cast to String.) If there are no more lines, null is returned.


All Packages  Class Hierarchy  This Package  Previous  Next  Index