object Pluralizer extends Pluralizer
Interface to Pluralizer This object allows us to write
Pluralizer("word")to obtain the plural form or
Pluralizer("word",countif 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 }}} the value of count. This class also calls all the base class methods to install the rules.
Pluralizer("word") }}} plural form or
Pluralizer("word",countif 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 }}} the value of count. This class also calls all the base class methods to install the rules.
- Alphabetic
- By Inheritance
- Pluralizer
- Pluralizer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
Rule
(singular: Pattern, plural: String) extends Product with Serializable
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(word: Symbol): String
- def apply(word: String, count: Int = 2): String
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
category(word_list: List[String], pattern: String, plural: String): Unit
- Attributes
- protected
- Definition Classes
- Pluralizer
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
irregular(pairs: List[(String, String)]): Unit
- Attributes
- protected
- Definition Classes
- Pluralizer
-
def
irregular(pair: (String, String)): Unit
- Attributes
- protected
- Definition Classes
- Pluralizer
-
def
irregular(singular: String, plural: String): Unit
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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
noplural(word_list: List[String]): Unit
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
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def pluralize(word: String, count: Int = 2): String
- def pluralize(word: Symbol): String
-
def
pluralize(word: String): String
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
-
val
rules: ListBuffer[Rule]
- Definition Classes
- Pluralizer
-
def
standard(pairs: List[(String, String)]): Unit
- Attributes
- protected
- Definition Classes
- Pluralizer
-
def
standard(pair: (String, String)): Unit
- Attributes
- protected
- Definition Classes
- Pluralizer
-
def
standard(singular: String, plural: String): Unit
- Attributes
- protected
- Definition Classes
- Pluralizer
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )