Java Comma Separated List addItemFromCommaStrings(final List list, final String commaStrings)

Here you can find the source of addItemFromCommaStrings(final List list, final String commaStrings)

Description

add Item From Comma Strings

License

Open Source License

Parameter

Parameter Description
languageList a parameter
commaStrings a parameter

Declaration

public static void addItemFromCommaStrings(final List<String> list, final String commaStrings) 

Method Source Code

//package com.java2s;

import java.util.List;

import java.util.Set;

public class Main {
    /**//  ww  w  .  ja  va 2  s  .c o m
     * @param languageList
     * @param commaStrings
     */
    public static void addItemFromCommaStrings(final List<String> list, final String commaStrings) {
        for (final String str : commaStrings.split(",")) {
            list.add(str);
        }
    }

    public static void addItemFromCommaStrings(final Set<String> list, final String commaStrings) {
        for (final String str : commaStrings.split(",")) {
            list.add(str);
        }
    }
}

Related

  1. addExecutableForBatchFile(List command)
  2. addJvmArgumentsAndOptions(final List commandLine, final String[] jvmArgsOpts)
  3. addMultiLine(String multiLine, List commandsList)
  4. addPropertyToCommand(List command, String key, String value)
  5. commaDelimitedListToStringArray(final String str)