Java String Pluralize plural(int amount)

Here you can find the source of plural(int amount)

Description

Is it second, or seconds?

License

Open Source License

Parameter

Parameter Description
amount The amount.

Return

The plural.

Declaration

public static String plural(int amount) 

Method Source Code

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

public class Main {
    /**//from  ww  w . j  a v  a 2 s. c o m
     * Is it second, or seconds?
     *
     * @param amount The amount.
     * @return The plural.
     */
    public static String plural(int amount) {
        return amount == 1 ? " " : "s ";
    }
}

Related

  1. plural(int count, String word, String ending)
  2. plural(int nb)
  3. plural(int number, String form1, String form2, String form3)
  4. plural(int size, String name)