Class LineEnder

java.lang.Object
uk.ac.starlink.ttools.task.LineEnder

public class LineEnder extends Object
Defines how line endings are handled when formatting stilts commands.
Since:
19 Sep 2017
Author:
Mark Taylor
  • Field Details

    • PLAIN

      public static final LineEnder PLAIN
      Just a carriage return.
    • BACKSLASH

      public static final LineEnder BACKSLASH
      Backslash followed by carriage return (Un*x shells).
    • CARET

      public static final LineEnder CARET
      Caret followed by carriage return (DOS CMD).
    • BACKTICK

      public static final LineEnder BACKTICK
      Backtick followed by carriage return (Windows PowerShell).
    • ONELINE

      public static final LineEnder ONELINE
      No line breaks, just one long line.
    • OPTIONS

      public static final LineEnder[] OPTIONS
      All options.
  • Constructor Details

    • LineEnder

      public LineEnder(String name, String eol)
      Constructor.
      Parameters:
      name - instance name, suitable for presentation to users
      eol - end of line text
  • Method Details

    • getEndOfLine

      public String getEndOfLine()
      Returns the end of line text.
      Returns:
      text separating two lines
    • includesNewline

      public boolean includesNewline()
      Indicates whether a newline forms part of the EOL string.
      Returns:
      true iff end of line includes a newline character
    • toString

      public String toString()
      Returns name.
      Overrides:
      toString in class Object