Java Integer Parse tryParseInteger(String intValue)

Here you can find the source of tryParseInteger(String intValue)

Description

try Parse Integer

License

Open Source License

Declaration

private static Object tryParseInteger(String intValue) 

Method Source Code

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

public class Main {
    private static Object tryParseInteger(String intValue) {
        Object parsedValue;/*w  w w. jav  a  2  s. c  om*/
        try {
            parsedValue = Integer.parseInt(intValue);
        } catch (NumberFormatException nfe) {
            parsedValue = intValue;
        }

        return parsedValue;
    }
}

Related

  1. tryParseInt(String str, int defaultValue)
  2. tryParseInt(String stringInt)
  3. tryParseInt(String text)
  4. tryParseInt(String value)
  5. tryParseInt(String value)
  6. tryParseInteger(String text)
  7. TryParseIntInvariant(String str, int[] n)
  8. tryParseInts(String[] in)