net.sf.mmm.util.text.base
Class EnglishSingularizer

java.lang.Object
  extended by net.sf.mmm.util.text.base.AbstractTextTransformer
      extended by net.sf.mmm.util.text.base.EnglishSingularizer
All Implemented Interfaces:
Singularizer, Transformer<String>

@Singleton
@Named
public class EnglishSingularizer
extends AbstractTextTransformer
implements Singularizer

This is the implementation of the Singularizer interface for English language. It aims for simplicity rather than linguistic perfection.

Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
static EnglishSingularizer INSTANCE
          The singleton instance.
private static List<TransformerRule> RULES
           
 
Constructor Summary
protected EnglishSingularizer()
          The constructor.
 
Method Summary
protected  List<TransformerRule> getRules()
          This method gets the list of rules.
 
Methods inherited from class net.sf.mmm.util.text.base.AbstractTextTransformer
transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mmm.util.text.api.Singularizer
transform
 

Field Detail

INSTANCE

public static final EnglishSingularizer INSTANCE
The singleton instance.


RULES

private static final List<TransformerRule> RULES
See Also:
getRules()
Constructor Detail

EnglishSingularizer

protected EnglishSingularizer()
The constructor.

Method Detail

getRules

protected List<TransformerRule> getRules()
This method gets the list of rules. These rules are processed in the order of occurrence. If a rule matches (does NOT return null ), that result is taken as singular form and no further rule is invoked.

Specified by:
getRules in class AbstractTextTransformer
Returns:
the rules.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.