Java Short Number Create toShort(Object prmIntObject)

Here you can find the source of toShort(Object prmIntObject)

Description

to Short

License

Apache License

Declaration

public static short toShort(Object prmIntObject) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static short toShort(Object prmIntObject) {
        short rtnInt16 = 0;
        if (prmIntObject != null) {
            if (prmIntObject.toString() != "") {
                rtnInt16 = Short.parseShort(prmIntObject.toString());
            }/*  w  w  w.  j  av a  2s  .c o m*/
        }
        return rtnInt16;
    }

    public static String toString(Object stringObject) {
        return toString(stringObject, "");
    }

    public static String toString(Object stringObject, String value2) {
        if (stringObject != null) {
            return stringObject.toString();
        } else {
            return value2;
        }
    }
}

Related

  1. toShort(Object ob, Short defaultShort)
  2. toShort(Object obj)
  3. toShort(Object obj)
  4. toShort(Object obj)
  5. toShort(Object obj)
  6. toShort(Object value)
  7. toShort(Object value)
  8. toShort(Object value)
  9. toShort(Object value)