Java Long Number Parse tryParseLong(String longValue)

Here you can find the source of tryParseLong(String longValue)

Description

try Parse Long

License

Open Source License

Declaration

private static Object tryParseLong(String longValue) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static Object tryParseLong(String longValue) {
        Object parsedValue;/*  w  w  w.j ava 2s.c o  m*/
        try {
            parsedValue = Long.parseLong(longValue);
        } catch (NumberFormatException nfe) {
            parsedValue = longValue;
        }

        return parsedValue;
    }
}

Related

  1. convertLong(String valueAsString)
  2. longFromString(String which, String s)
  3. longFromStringWithoutThrow(String longVal)
  4. tryParseLong(Object obj, Long defaultVal)
  5. tryParseLong(String longString, int defaultValue)
  6. TryParseLong(String str, long[] n)