Android String to Long Convert stringToListLong(String input)

Here you can find the source of stringToListLong(String input)

Description

string To List Long

Declaration

public static List<Long> stringToListLong(String input) 

Method Source Code

//package com.java2s;
import java.util.ArrayList;

import java.util.List;

public class Main {
    private static final String COMMA = ",";

    public static List<Long> stringToListLong(String input) {

        List<Long> outList = new ArrayList<Long>();
        if (null == input || input.trim().isEmpty()) {
            return outList;
        }//from   w w  w .  java2 s  .com
        String[] out = input.split(COMMA);
        for (String temp : out) {
            outList.add(Long.parseLong(temp));
        }

        return outList;

    }
}

Related

  1. parseLong(String s)
  2. getLongValue(String value, Long defaultValue)
  3. toLong(String obj)
  4. isLong(String str)
  5. getLongValue(String str)
  6. toLong(String value)
  7. toLong(String str, long defValue)
  8. parseLong(String string, long defValue)
  9. convertStringToLong(String str, long failValue)