java.lang.Object
com.github.sttk.linebreak.LineIter
LineIter
is the class that outputs the given string line by line.
This class can control the overall line width and the indentation from any
desired line.-
Constructor Details
-
LineIter
Is the constructor that creates aLineIter
instance which outputs the given string line by line.- Parameters:
text
- A string to be output with line breaking.lineWidth
- A width of the output lines.
-
-
Method Details
-
setIndent
Sets an indentation for the subsequent lines.- Parameters:
indent
- A string to be used for indentation.
-
init
Re-initializes with an argument string for reusing this instance.- Parameters:
text
- A string to be output with line breaking.
-
hasNext
public boolean hasNext()Checks whether the remaining string exists or not. -
next
Returns a string of the next line.
-