spring-framework / org.springframework.beans.propertyeditors / StringArrayPropertyEditor / <init>

<init>

StringArrayPropertyEditor()

Create a new StringArrayPropertyEditor with the default separator (a comma).

An empty text (without elements) will be turned into an empty array.

StringArrayPropertyEditor(separator: String)

Create a new StringArrayPropertyEditor with the given separator.

An empty text (without elements) will be turned into an empty array.

Parameters

separator - the separator to use for splitting a String

StringArrayPropertyEditor(separator: String, emptyArrayAsNull: Boolean)

Create a new StringArrayPropertyEditor with the given separator.

Parameters

separator - the separator to use for splitting a String

emptyArrayAsNull - true if an empty String array is to be transformed into null

StringArrayPropertyEditor(separator: String, emptyArrayAsNull: Boolean, trimValues: Boolean)

Create a new StringArrayPropertyEditor with the given separator.

Parameters

separator - the separator to use for splitting a String

emptyArrayAsNull - true if an empty String array is to be transformed into null

trimValues - true if the values in the parsed arrays are to be trimmed of whitespace (default is true).

StringArrayPropertyEditor(separator: String, @Nullable charsToDelete: String, emptyArrayAsNull: Boolean)

Create a new StringArrayPropertyEditor with the given separator.

Parameters

separator - the separator to use for splitting a String

charsToDelete - a set of characters to delete, in addition to trimming an input String. Useful for deleting unwanted line breaks: e.g. "\r\n\f" will delete all new lines and line feeds in a String.

emptyArrayAsNull - true if an empty String array is to be transformed into null

StringArrayPropertyEditor(separator: String, @Nullable charsToDelete: String, emptyArrayAsNull: Boolean, trimValues: Boolean)

Create a new StringArrayPropertyEditor with the given separator.

Parameters

separator - the separator to use for splitting a String

charsToDelete - a set of characters to delete, in addition to trimming an input String. Useful for deleting unwanted line breaks: e.g. "\r\n\f" will delete all new lines and line feeds in a String.

emptyArrayAsNull - true if an empty String array is to be transformed into null

trimValues - true if the values in the parsed arrays are to be trimmed of whitespace (default is true).