Here you can find the source of plural(String arg)
public static final String plural(String arg)
//package com.java2s; //License from project: Open Source License public class Main { public static final String plural(String arg) { if (arg == null) { return ""; }/*w ww . j a v a2 s . com*/ try { double a = Double.valueOf(arg); if (a == 1.0) { return ""; } else { return "s"; } } catch (NumberFormatException e) { return ""; } } public static final String plural(double arg) { return plural(Double.toString(arg)); } }