Class SilverpeasBundleList

    • Method Detail

      • with

        public static SilverpeasBundleList with​(String... values)
        Initializes a list with the given string values if any.
        Parameters:
        values - none, one or several string values.
        Returns:
        the initialized list.
      • asStringArray

        public String[] asStringArray()
        Converts the list into an array of String.
        Returns:
        the current list converted into String array. No treatment is performed about not defined values.
      • asStringArray

        public String[] asStringArray​(String defaultValue)
        Converts the list into an array of String.
        Parameters:
        defaultValue - the default value to register if one is not defined.
        Returns:
        the current list converted into String array with default value applied on not defined values.
      • asStringList

        public List<String> asStringList​(String defaultValue)
        Converts the list into an list of String with default value if necessary.
        Parameters:
        defaultValue - the default value to register if one is not defined.
        Returns:
        the current list converted into String list with default value applied on not defined values.
      • asIntegerArray

        public Integer[] asIntegerArray()
        Converts the list into an array of Integer.
        Returns:
        the current list converted into Integer array with null value applied on not defined values.
        Throws:
        NumberFormatException - if the string does not contain a parsable integer.
      • asIntegerList

        public List<Integer> asIntegerList()
        Converts the list into a list of Integer.
        Returns:
        the current list converted into Integer list with null value applied on not defined values.
        Throws:
        NumberFormatException - if the string does not contain a parsable integer.
      • asIntegerArray

        public Integer[] asIntegerArray​(Integer defaultValue)
        Converts the list into an array of Integer.
        Parameters:
        defaultValue - the default value to register if one is not defined.
        Returns:
        the current list converted into Integer array with default value applied on not defined values.
        Throws:
        NumberFormatException - if the string does not contain a parsable integer.
      • asIntegerList

        public List<Integer> asIntegerList​(Integer defaultValue)
        Converts the list into a list of Integer.
        Parameters:
        defaultValue - the default value to register if one is not defined.
        Returns:
        the current list converted into Integer list with default value applied on not defined values.
        Throws:
        NumberFormatException - if the string does not contain a parsable integer.