Here you can find the source of Pluralize(int quantity, String units)
public static String Pluralize(int quantity, String units)
//package com.java2s; //License from project: Open Source License public class Main { public static String Pluralize(int quantity, String units) { if (quantity == 1) { return quantity + " " + units; } else {//from w w w. j av a 2 s. c om return quantity + " " + units + "s "; } } }