Java String Pluralize plural(String strSingle, String strPlural, int amount)

Here you can find the source of plural(String strSingle, String strPlural, int amount)

Description

plural

License

Open Source License

Declaration

private static String plural(String strSingle, String strPlural, int amount) 

Method Source Code

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

public class Main {
    private static String plural(String strSingle, String strPlural, int amount) {
        return String.format(amount == 1 ? strSingle : strPlural, amount);
    }//from  w  w w.j  av a  2  s .c o m
}

Related

  1. plural(int size, String name)
  2. plural(String arg)
  3. plural(String objectName)
  4. plural(String singular)
  5. plural(String str, String suffix, int count)
  6. plural(String txt)
  7. plural(String type)
  8. plural(String word)
  9. plural(String word, Number cardinality)