Java Object to Short castToShort(final String uid)

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

Description

cast To Short

License

Open Source License

Declaration

public static Short castToShort(final String uid) 

Method Source Code

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

public class Main {
    public static Short castToShort(final String uid) {
        try {// w w w.ja  v  a2  s  . com
            return Short.decode(uid);
        } catch (NumberFormatException nfe) {
            return null;
        }
    }
}

Related

  1. castShort(Object o)
  2. castShort(Object o)
  3. castShort(Object val)
  4. castShortToFloat(short[] x)
  5. castToShort(final int value)
  6. castToShort(Object value)
  7. castToShort(Object value)