Java String to List stringToListOfTags(String p)

Here you can find the source of stringToListOfTags(String p)

Description

Converting a string with a list of tags separated with commas to a list of strings

License

EUPL

Parameter

Parameter Description
p a parameter

Declaration

public static List<String> stringToListOfTags(String p) 

Method Source Code

//package com.java2s;
/* //w ww  .  java 2s  . co  m
 *  Copyright (c) 2010-2014 EUROPEAN UNION
 *  Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
 *  the European Commission - subsequent versions of the EUPL (the "Licence");
 *  You may not use this work except in compliance with the Licence.
 *  You may obtain a copy of the Licence at: 
 *  http://ec.europa.eu/idabc/eupl
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the Licence is distributed on an "AS IS" basis,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the Licence for the specific language governing permissions and
 *  limitations under the Licence.
 *  
 *  Date: __/__/____
 *  Authors: European Commission, Joint Research Centre
 *  Lucasz Cyra, Emanuela Epure, Daniele Francioli
 *  aq-dev@jrc.ec.europa.eu
 */

import java.util.Arrays;
import java.util.List;

public class Main {
    /**
     * Converting a string with a list of tags separated with commas to a list
     * of strings
     *
     * @param p
     * @return
     */
    public static List<String> stringToListOfTags(String p) {
        return Arrays.asList(p.split(","));
    }
}

Related

  1. stringToList(String string, String separator)
  2. stringToList(String text, String seperator)
  3. stringToList(String toList)
  4. stringToList(String toList, String delimiter)
  5. stringToList(String value)
  6. strToAList(String strTokenize)
  7. strToList(String str, String regex)
  8. strToList(String str, String separator)
  9. strToList(String str, String split)