Java Object to int castToInteger(final String uid)

Here you can find the source of castToInteger(final String uid)

Description

cast To Integer

License

Open Source License

Declaration

public static Integer castToInteger(final String uid) 

Method Source Code

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

public class Main {
    public static Integer castToInteger(final String uid) {
        try {/*  www.j a v  a  2 s.c o  m*/
            return Integer.decode(uid);
        } catch (NumberFormatException nfe) {
            return null;
        }
    }
}

Related

  1. castInt(Object o)
  2. castInt(Object o)
  3. castToInt(double[] aDouble)
  4. castToInt(final long value)
  5. castToInt(Object value)
  6. castToInteger(Object object)
  7. castToInteger(Object value)
  8. castToIntegerArray(Object[] array)
  9. castToInts(final double[] doubles)