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 boolean contentEquals​(java.lang.CharSequence cs)  
    boolean isComplete()  
    static java.lang.String joinLinesToString​(java.util.Collection<? extends Line> lines, java.lang.CharSequence delimiter)  
    int lineNumber()
    Number of the Line, starting at 1.
    static java.util.List<AbstractLine> linesOf​(java.lang.String multiLineText)  
    static AbstractLine of​(java.lang.String text)  
    java.lang.String text()  
    java.lang.String toString()
    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! Use text() for that purpose.
      Overrides:
      toString in class java.lang.Object
    • contentEquals

      default boolean contentEquals​(java.lang.CharSequence cs)
    • of

      static AbstractLine of​(java.lang.String text)
    • linesOf

      static java.util.List<AbstractLine> linesOf​(java.lang.String multiLineText)
    • joinLinesToString

      static java.lang.String joinLinesToString​(java.util.Collection<? extends Line> lines, java.lang.CharSequence delimiter)