Java Integer Create toIntString(Object object)

Here you can find the source of toIntString(Object object)

Description

to Int String

License

Open Source License

Declaration

public static String toIntString(Object object) 

Method Source Code

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

public class Main {

    public static String toIntString(Object object) {
        if (object == null) {
            return null;
        } else if (object instanceof Number) {
            return String.valueOf(((Number) object).intValue());
        } else {//from ww  w .  j a va 2 s. c om
            return object.toString();
        }
    }
}

Related

  1. toInts(String intArray)
  2. toInts(String[] values)
  3. toIntsFromUBytes(byte[] byteArray)
  4. toIntStr(String floatStr)
  5. toIntString(Integer integer)
  6. toIntUnsigned(short x)
  7. toIntValue(char ch)
  8. toIntValue(char ch, int defaultValue)
  9. toIntValue(final char ch)