net.sf.mmm.util.transformer.api
Interface Transformer<V>

Type Parameters:
V - is the templated type of the value.
All Known Subinterfaces:
Singularizer, StringTransformerRule
All Known Implementing Classes:
AbstractTextTransformer, EnglishSingularizer, RegexStringTransformer, RegexStringTransformerRule, StringTransformerChain

public interface Transformer<V>

This is the interface for a transformer that transforms a given value.

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

Method Summary
 V transform(V original)
          This method transforms a given original value.
 

Method Detail

transform

V transform(V original)
This method transforms a given original value. This value must NOT be modified by this method. To change the original value a new value has to be created and returned instead. If the value should NOT be changed, the original value (the exact same instance) should be returned.

Parameters:
original - is the original value.
Returns:
the transformed value. May only be null if explicitly documented by the implementation. The receiver of a Transformer should also document if null is a legal result.


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