org.apache.commons.betwixt.strategy.PluralStemmer |
Known Indirect Subclasses
DefaultPluralStemmer |
A default implementation of the plural name stemmer which
tests for some common english plural/singular patterns and
then uses a simple starts-with algorithm |
|
Class Overview
A plugin Strategy pattern which will detect the plural property which
maps to a singular property name.
This Strategy is used when composite properties (such as properties
of type Collection, List, Iterator, Enumeration) are used as we need to
match the adder-method, which typically uses a singular name.
This interface allows a variety of different implementations to be used.
Public Methods
public
abstract
ElementDescriptor
findPluralDescriptor
(String propertyName, Map map)
Find the plural descriptor for a singular property.
Parameters
propertyName
| is the singular property name, from the adder method |
map
| is a map with the keys are the property names of the available
descriptors and the values are the descriptors. This may not be null.
|
Returns
- the plural descriptor for the given singular property name
or
null
is no matching descriptor can be found