Enum NormalizeLineSeparatorReader.LineSeparator
- java.lang.Object
-
- java.lang.Enum<NormalizeLineSeparatorReader.LineSeparator>
-
- org.apache.maven.enforcer.rules.checksum.NormalizeLineSeparatorReader.LineSeparator
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<NormalizeLineSeparatorReader.LineSeparator>
- Enclosing class:
- NormalizeLineSeparatorReader
public static enum NormalizeLineSeparatorReader.LineSeparator extends java.lang.Enum<NormalizeLineSeparatorReader.LineSeparator>
Type representing either Unix or Windows line separators
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
NormalizeLineSeparatorReader.LineSeparator.MatchResult
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Character
notPrecededByChar
private char[]
separatorChars
-
Constructor Summary
Constructors Modifier Constructor Description private
LineSeparator(java.lang.String separator, java.lang.Character notPrecededByChar)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NormalizeLineSeparatorReader.LineSeparator.MatchResult
matches(char currentCharacter, java.lang.Character previousCharacter)
Checks if two given characters match the line separator represented by this object.static NormalizeLineSeparatorReader.LineSeparator
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static NormalizeLineSeparatorReader.LineSeparator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WINDOWS
public static final NormalizeLineSeparatorReader.LineSeparator WINDOWS
-
UNIX
public static final NormalizeLineSeparatorReader.LineSeparator UNIX
-
-
Method Detail
-
values
public static NormalizeLineSeparatorReader.LineSeparator[] 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 (NormalizeLineSeparatorReader.LineSeparator c : NormalizeLineSeparatorReader.LineSeparator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NormalizeLineSeparatorReader.LineSeparator valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
matches
public NormalizeLineSeparatorReader.LineSeparator.MatchResult matches(char currentCharacter, java.lang.Character previousCharacter)
Checks if two given characters match the line separator represented by this object.- Parameters:
currentCharacter
- the character to check againstpreviousCharacter
- optional previous character (may benull
)- Returns:
- one of
NormalizeLineSeparatorReader.LineSeparator.MatchResult
-
-