Java String Value Of valueOfStringToLong(String[] values)

Here you can find the source of valueOfStringToLong(String[] values)

Description

value Of String To Long

License

Open Source License

Declaration

public static long[] valueOfStringToLong(String[] values) 

Method Source Code

//package com.java2s;

public class Main {

    public static long[] valueOfStringToLong(String[] values) {
        if (null == values) {
            return new long[0];
        }/*from  w ww .j a v a  2 s.c o m*/

        long reValue[] = new long[values.length];
        for (int i = 0; i < values.length; i++) {
            try {
                reValue[i] = Long.parseLong(values[i]);
            } catch (Exception e) {
                reValue[i] = -1;
            }
        }

        return reValue;
    }
}

Related

  1. valueOfLongToString(long[] values)
  2. valueOfNullSafe(final Class enumType, final String name)
  3. valueOfOrEmptyString(final Object object)
  4. valueOfString(String str, int len)
  5. ValueOfString(String value)
  6. valueOfYesNo(String parameter)