org.schmant.task.text
Enum EolStyle

java.lang.Object
  extended by java.lang.Enum<EolStyle>
      extended by org.schmant.task.text.EolStyle
All Implemented Interfaces:
Serializable, Comparable<EolStyle>

public enum EolStyle
extends Enum<EolStyle>

Different end of line markers.

Since:
0.5
Author:
Karl Gustafsson
Task_package:
org.schmant.task.base

Enum Constant Summary
CR
          A line ending with a single carriage return.
CRLF
          A line ending with both a carriage return and a line feed.
DOS
          DOS style line ending (carriage return and then line feed)
LF
          A line ending with a single line feed.
MAC
          Macintosh style line ending (single carriage return).
UNIX
          Unix style line ending (single line feed).
WIN
          Windows style line ending (carriage return and then line feed)
 
Method Summary
 String getEol()
          Get the end of line string for this specific encoding.
 String toString()
           
static EolStyle valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EolStyle[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CR

public static final EolStyle CR
A line ending with a single carriage return.


LF

public static final EolStyle LF
A line ending with a single line feed.


CRLF

public static final EolStyle CRLF
A line ending with both a carriage return and a line feed.


MAC

public static final EolStyle MAC
Macintosh style line ending (single carriage return).


UNIX

public static final EolStyle UNIX
Unix style line ending (single line feed).


DOS

public static final EolStyle DOS
DOS style line ending (carriage return and then line feed)


WIN

public static final EolStyle WIN
Windows style line ending (carriage return and then line feed)

Method Detail

values

public static EolStyle[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EolStyle c : EolStyle.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EolStyle valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getEol

public String getEol()
Get the end of line string for this specific encoding.

Returns:
The EOL string.

toString

public String toString()
Overrides:
toString in class Enum<EolStyle>