|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.jomc.util.LineEditor
public class LineEditor
Interface to line based editing.
edit(java.lang.String)| Field Summary | |
|---|---|
private LineEditor |
editor
Editor to chain. |
private String |
lineSeparator
Line separator. |
| Constructor Summary | |
|---|---|
LineEditor()
Creates a new LineEditor instance. |
|
LineEditor(LineEditor editor)
Creates a new LineEditor instance taking an editor to chain. |
|
LineEditor(LineEditor editor,
String lineSeparator)
Creates a new LineEditor instance taking an editor to chain and a string to use for separating lines. |
|
LineEditor(String lineSeparator)
Creates a new LineEditor instance taking a string to use for separating lines. |
|
| Method Summary | |
|---|---|
String |
edit(String text)
Edits texts. |
protected String |
editLine(String line)
Edits a line. |
protected String |
getLineSeparator()
Gets the line separator of the editor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private LineEditor editor
private String lineSeparator
| Constructor Detail |
|---|
public LineEditor()
LineEditor instance.
public LineEditor(String lineSeparator)
LineEditor instance taking a string to use for separating lines.
lineSeparator - String to use for separating lines.public LineEditor(LineEditor editor)
LineEditor instance taking an editor to chain.
editor - The editor to chain.
public LineEditor(LineEditor editor,
String lineSeparator)
LineEditor instance taking an editor to chain and a string to use for separating lines.
editor - The editor to chain.lineSeparator - String to use for separating lines.| Method Detail |
|---|
protected final String getLineSeparator()
public final String edit(String text)
This method splits the given string into lines and passes every line to method editLine in order of
occurrence. On end of input, method editLine is called with a null argument.
text - The text to edit or null.
null.protected String editLine(String line)
line - The line to edit or null indicating the end of input.
line with, or null to replace line with nothing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||