クラス StringArrayPropertyEditor

java.lang.ObjectSE
java.beans.PropertyEditorSupportSE
org.springframework.beans.propertyeditors.StringArrayPropertyEditor
実装されたすべてのインターフェース:
PropertyEditorSE

public class StringArrayPropertyEditor extends PropertyEditorSupportSE
文字列配列用のカスタム PropertyEditorSE

文字列は、カスタマイズ可能な区切り文字を使用した CSV 形式である必要があります。デフォルトでは、結果の値は空白でトリミングされます。

作成者:
Rod Johnson, Juergen Hoeller, Dave Syer
関連事項:
  • フィールドの詳細

    • DEFAULT_SEPARATOR

      public static final StringSE DEFAULT_SEPARATOR
      文字列を分割するためのデフォルトのセパレータ: コンマ(",")。
      関連事項:
  • コンストラクターの詳細

    • StringArrayPropertyEditor

      public StringArrayPropertyEditor()
      デフォルトのセパレーター(コンマ)を使用して新しい StringArrayPropertyEditor を作成します。

      空のテキスト(要素なし)は空の配列に変換されます。

    • StringArrayPropertyEditor

      public StringArrayPropertyEditor(StringSE separator)
      指定されたセパレータで新しい StringArrayPropertyEditor を作成します。

      空のテキスト(要素なし)は空の配列に変換されます。

      パラメーター:
      separator - StringSE の分割に使用するセパレータ
    • StringArrayPropertyEditor

      public StringArrayPropertyEditor(StringSE separator, boolean emptyArrayAsNull)
      指定されたセパレータで新しい StringArrayPropertyEditor を作成します。
      パラメーター:
      separator - StringSE の分割に使用するセパレータ
      emptyArrayAsNull - 空の文字列配列を null に変換する場合は true 
    • StringArrayPropertyEditor

      public StringArrayPropertyEditor(StringSE separator, boolean emptyArrayAsNull, boolean trimValues)
      指定されたセパレータで新しい StringArrayPropertyEditor を作成します。
      パラメーター:
      separator - StringSE の分割に使用するセパレータ
      emptyArrayAsNull - 空の文字列配列を null に変換する場合は true 
      trimValues - 解析された配列の値を空白から削除する場合は true (デフォルトは true です)
    • StringArrayPropertyEditor

      public StringArrayPropertyEditor(StringSE separator, @Nullable StringSE charsToDelete, boolean emptyArrayAsNull)
      指定されたセパレータで新しい StringArrayPropertyEditor を作成します。
      パラメーター:
      separator - StringSE の分割に使用するセパレータ
      charsToDelete - 入力文字列のトリミングに加えて、削除する文字のセット。不要な改行を削除するのに便利です。"\r \n \ f" は、文字列内のすべての新しい行と改行を削除します。
      emptyArrayAsNull - 空の文字列配列を null に変換する場合は true 
    • StringArrayPropertyEditor

      public StringArrayPropertyEditor(StringSE separator, @Nullable StringSE charsToDelete, boolean emptyArrayAsNull, boolean trimValues)
      指定されたセパレータで新しい StringArrayPropertyEditor を作成します。
      パラメーター:
      separator - StringSE の分割に使用するセパレータ
      charsToDelete - 入力文字列のトリミングに加えて、削除する文字のセット。不要な改行を削除するのに便利です。"\r \n \ f" は、文字列内のすべての新しい行と改行を削除します。
      emptyArrayAsNull - 空の文字列配列を null に変換する場合は true 
      trimValues - 解析された配列の値を空白から削除する場合は true (デフォルトは true です)
  • メソッドの詳細