Package de.tum.in.test.api.io
Interface Line
- All Known Implementing Classes:
AbstractLine
public interface Line
This is basically a String with additional information and some constraints.
Constraints:
- Must not contain any line break or new line (
'\r'or'\n')
Additional information:
- Optional: a line number, starting at 1.
- Since:
- 0.1.0
- Version:
- 1.0.0
- Author:
- Christian Femers
-
Method Summary
Modifier and Type Method Description default booleancontentEquals(java.lang.CharSequence cs)booleanisComplete()static java.lang.StringjoinLinesToString(java.util.Collection<? extends Line> lines, java.lang.CharSequence delimiter)intlineNumber()Number of the Line, starting at 1.static java.util.List<AbstractLine>linesOf(java.lang.String multiLineText)static AbstractLineof(java.lang.String text)java.lang.Stringtext()java.lang.StringtoString()This does not return the lines content only!
-
Method Details
-
text
java.lang.String text() -
isComplete
boolean isComplete() -
lineNumber
int lineNumber()Number of the Line, starting at 1.- Returns:
- the line number or -1, if none is set
-
toString
java.lang.String toString()This does not return the lines content only! Usetext()for that purpose.- Overrides:
toStringin classjava.lang.Object
-
contentEquals
default boolean contentEquals(java.lang.CharSequence cs) -
of
-
linesOf
-
joinLinesToString
static java.lang.String joinLinesToString(java.util.Collection<? extends Line> lines, java.lang.CharSequence delimiter)
-