Java Integer Create toIntList(String valus)

Here you can find the source of toIntList(String valus)

Description

to Int List

License

Apache License

Declaration

public static Integer[] toIntList(String valus) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static Integer[] toIntList(String valus) {
        Integer[] intList = null;

        try {/*ww  w.j  a v  a2s . c o  m*/
            String[] strList = valus.replace(" ", "").split(",");

            intList = new Integer[strList.length];

            for (int i = 0; i < strList.length; i++) {
                intList[i] = Integer.parseInt(strList[i]);
            }
        } catch (Exception e) {
        }

        return intList;
    }
}

Related

  1. toIntExact(long value)
  2. toIntExp(String charExp)
  3. toIntFormat(String value)
  4. toIntHeader(String value)
  5. toIntLE(byte[] value)
  6. toIntMatrix(Number[][] matrix)
  7. toIntOrNull(String string)
  8. toIntPlusOneString(Object object)
  9. toIntRound(double[] a)