Enum EndOfLine

    • Enum Constant Detail

      • AUTO

        @Stability(Experimental)
        public static final EndOfLine AUTO
        (experimental) Maintain existing (mixed values within one file are normalised by looking at what's used after the first line).
      • CR

        @Stability(Experimental)
        public static final EndOfLine CR
        (experimental) Carriage Return character only (\r), used very rarely.
      • CRLF

        @Stability(Experimental)
        public static final EndOfLine CRLF
        (experimental) Carriage Return + Line Feed characters (\r\n), common on Windows.
      • LF

        @Stability(Experimental)
        public static final EndOfLine LF
        (experimental) Line Feed only (\n), common on Linux and macOS as well as inside git repos.
    • Method Detail

      • values

        public static EndOfLine[] 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 (EndOfLine c : EndOfLine.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EndOfLine 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