Here you can find the source of parseIntOrZero(CharSequence charSequence)
public static int parseIntOrZero(CharSequence charSequence)
//package com.java2s; import android.text.TextUtils; public class Main { public static int parseIntOrZero(CharSequence charSequence) { if (!TextUtils.isEmpty(charSequence)) { try { return Integer.parseInt(charSequence.toString()); } catch (NumberFormatException ignore) { }/*ww w . ja v a 2 s.c o m*/ } return 0; } }