Top Description Fields Constructors Methods
de.siegmar.fastcsv.util

public final Class Util

extends Object
Class Inheritance

Internal utility class.

It is not a part of the API!

Field Summary

Modifier and TypeField and Description
public static final char
CR

Carriage return.

public static final char
LF

Line feed.

Constructor Summary

AccessConstructor and Description
private
Util()

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true if any character appears more than once in the array, false otherwise
containsDupe
(final char...
the array of characters to check for duplicates
chars
)

Checks if the given array of characters contains any duplicate characters.

public static boolean

Returns:

true if the string contains either CR or LF, false otherwise
containsNewline
(final String
the string to check for newlines
str
)

Checks if the given string contains any newline characters.

public static boolean

Returns:

true if the argument is CR or LF
isNewline
(final char
character to test.
character
)

Checks if the given character is a newline character.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CRback to summary
public static final char CR

Carriage return.

LFback to summary
public static final char LF

Line feed.

Constructor Detail

Utilback to summary
private Util()

Method Detail

containsDupeback to summary
public static boolean containsDupe(final char... chars)

Checks if the given array of characters contains any duplicate characters.

Parameters
chars:char[]

the array of characters to check for duplicates

Returns:boolean

true if any character appears more than once in the array, false otherwise

containsNewlineback to summary
public static boolean containsNewline(final String str)

Checks if the given string contains any newline characters.

Parameters
str:String

the string to check for newlines

Returns:boolean

true if the string contains either CR or LF, false otherwise

isNewlineback to summary
public static boolean isNewline(final char character)

Checks if the given character is a newline character.

Parameters
character:char

character to test.

Returns:boolean

true if the argument is CR or LF