IrregularMappingRule

org.beangle.commons.text.inflector.rule.IrregularMappingRule
class IrregularMappingRule(wordMappings: Map[String, String], regex: String) extends AbstractRegexReplacementRule

IrregularMappingRule class.

Attributes

Graph
Supertypes
trait Rule
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def replace(m: Matcher): String

Use the state in the given [[Matcher]] to perform a replacement.

Use the state in the given [[Matcher]] to perform a replacement.

Attributes

Definition Classes

Inherited 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

Inherited from:
AbstractRegexReplacementRule
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

Inherited from:
AbstractRegexReplacementRule