Java String Pluralize plural(int size, String name)

Here you can find the source of plural(int size, String name)

Description

plural

License

Open Source License

Parameter

Parameter Description
size a parameter
name a parameter

Declaration

static public String plural(int size, String name) 

Method Source Code

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

public class Main {
    /**/*from ww  w. jav  a  2 s  . co m*/
     * 
     * @param size
     * @param name
     * @return
     */
    static public String plural(int size, String name) {
        return "" + size + " " + name + (size > 1 ? "s" : "");
    }
}

Related

  1. plural(int amount)
  2. plural(int count, String word, String ending)
  3. plural(int nb)
  4. plural(int number, String form1, String form2, String form3)
  5. plural(String arg)
  6. plural(String objectName)
  7. plural(String singular)
  8. plural(String str, String suffix, int count)