Class PluralUtil


  • public class PluralUtil
    extends java.lang.Object
    Author:
    kir This class allows to convert a word from/to singular/plural form.
    • Constructor Summary

      Constructors 
      Constructor Description
      PluralUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.String toPluralIfNeeded​(java.lang.String name, int count)
      Deprecated.
      use StringUtil.pluralize(String, int) instead
      static java.lang.String toPluralSlashSeparated​(java.lang.String txt, int count)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PluralUtil

        public PluralUtil()
    • Method Detail

      • toPluralIfNeeded

        public static java.lang.String toPluralIfNeeded​(java.lang.String name,
                                                        int count)
        Deprecated.
        use StringUtil.pluralize(String, int) instead
        Parameters:
        name - name
        count - count
        Returns:
        pluralized name
      • toPluralSlashSeparated

        public static java.lang.String toPluralSlashSeparated​(java.lang.String txt,
                                                              int count)
        Parameters:
        txt - Slash-separated text to be pluralized, like 'class/test/object'
        count - count
        Returns:
        'classes/tests/objects'