Java String Pluralize Pluralize(int quantity, String units)

Here you can find the source of Pluralize(int quantity, String units)

Description

Pluralize

License

Open Source License

Declaration

public static String Pluralize(int quantity, String units) 

Method Source Code

//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 ";
        }
    }
}

Related

  1. pluralize(int count, String single)
  2. pluralize(int count, String singular)
  3. pluralize(int count, String singular, String plural)
  4. pluralize(int count, String singular, String plural)
  5. pluralize(int count, String word)
  6. pluralize(int value, CharSequence singularForm, CharSequence pluralForm)
  7. pluralize(long count, String singularFormat, String pluralFormat)
  8. pluralize(long strictlyPositiveCount, String singular, String plural)
  9. pluralize(long val, String singular, String plural)