SuffixInflectionRule

org.beangle.commons.text.inflector.rule.SuffixInflectionRule
class SuffixInflectionRule(suffix: String, val singularSuffix: String, val pluralSuffix: String) extends Rule

SuffixInflectionRule class.

Attributes

Graph
Supertypes
trait Rule
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Constructors

def this(singularSuffix: String, pluralSuffix: String)

Construct a rule for words with suffix singularSuffix which becomes pluralSuffix in the plural.

Construct a rule for words with suffix singularSuffix which becomes pluralSuffix in the plural.

Value parameters

pluralSuffix

the plural suffix, starting with a "-" character

singularSuffix

the singular suffix, starting with a "-" character

Attributes

Concrete methods

def applies(word: String): Boolean

Tests to see if this rule applies for the given word.

Tests to see if this rule applies for the given word.

Attributes

Returns

true if this rule should be applied, false otherwise

def apply(word: String): String

Applies this rule to the word, and transforming it into a new form.

Applies this rule to the word, and transforming it into a new form.

Attributes

Returns

the transformed word

Concrete fields

val pluralSuffix: String
val singularSuffix: String