Object/Class

com.reactific.helpers

Pluralizer

Related Docs: class Pluralizer | package helpers

Permalink

object Pluralizer extends Pluralizer

Interface to Pluralizer This object allows us to write

Pluralizer("word")

to obtain the plural form or

Pluralizer("word",count

if we want it to be based on the value of count. This class also calls all the base class methods to install the rules.

Pluralizer("word",count }}} This class also calls all the base class methods to install the rules.

Pluralizer("word") }}}

Pluralizer("word",count

if we want it to be based on the value of count. This class also calls all the base class methods to install the rules.

Pluralizer("word",count }}} This class also calls all the base class methods to install the rules.

Linear Supertypes
Pluralizer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Pluralizer
  2. Pluralizer
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Rule(singular: Pattern, plural: String) extends Product with Serializable

    Permalink

    A rule is very simple, it maps a pattern to match with the substitution to make for that pattern.

    A rule is very simple, it maps a pattern to match with the substitution to make for that pattern.

    singular

    A regular expression with a substitution group to be replaced by plural

    plural

    The substitution for the group in singular

    Definition Classes
    Pluralizer

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(word: Symbol): String

    Permalink
  5. def apply(word: String, count: Int = 2): String

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def category(word_list: List[String], pattern: String, plural: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Pluralizer
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. def irregular(pairs: List[(String, String)]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Pluralizer
  15. def irregular(pair: (String, String)): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Pluralizer
  16. def irregular(singular: String, plural: String): Unit

    Permalink

    Declaration of an irregular wwhose plural just doesn't match a rule Subclasses can register a pair of words that have an irregular plural form.

    Declaration of an irregular wwhose plural just doesn't match a rule Subclasses can register a pair of words that have an irregular plural form. That is, it is not easy to convert the singular to the plural so both must be specified.

    singular

    The singular form of the word

    plural

    The plural form of the word

    Attributes
    protected
    Definition Classes
    Pluralizer
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def noplural(word_list: List[String]): Unit

    Permalink

    Declaration of a list of non-plural words.

    Declaration of a list of non-plural words. Subclasses can register a list of words that do not have plural forms. The plural words will each be the same as their singular word counterpart.

    word_list

    A list of worlds whose plural form is the same as its singular form.

    Attributes
    protected
    Definition Classes
    Pluralizer
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def pluralize(word: String, count: Int = 2): String

    Permalink
  23. def pluralize(word: Symbol): String

    Permalink
  24. def pluralize(word: String): String

    Permalink

    The main interface to this class.

    The main interface to this class. Call pluralize to pluralize any word and return its plural form.

    word

    The word to be pluralized

    returns

    The plural form of word

    Definition Classes
    Pluralizer
  25. val rules: ListBuffer[Rule]

    Permalink
    Definition Classes
    Pluralizer
  26. def standard(pairs: List[(String, String)]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Pluralizer
  27. def standard(pair: (String, String)): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Pluralizer
  28. def standard(singular: String, plural: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Pluralizer
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Pluralizer

Inherited from AnyRef

Inherited from Any

Ungrouped