# 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 Summary

Fields
Modifier and Type
Field
Description
`static final LineEnder`
`BACKSLASH`
Backslash followed by carriage return (Un*x shells).
`static final LineEnder`
`BACKTICK`
Backtick followed by carriage return (Windows PowerShell).
`static final LineEnder`
`CARET`
Caret followed by carriage return (DOS CMD).
`static final LineEnder`
`ONELINE`
No line breaks, just one long line.
`static final LineEnder[]`
`OPTIONS`
All options.
`static final LineEnder`
`PLAIN`
Just a carriage return.

## Constructor Summary

Constructors
Constructor
Description
`LineEnder(String name, String eol)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`getEndOfLine()`
Returns the end of line text.
`boolean`
`includesNewline()`
Indicates whether a newline forms part of the EOL string.
`String`
`toString()`
Returns name.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## 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`