public interface TransformerConvert objects (cache keys only) from their original Java types to a String representation (which is suitable to be used in a Lucene index) and vice versa. Transformers are needed only for custom types. Primitive types (boxed), java.lang.String, java.util.UUID and byte arrays are internally handled without the need of a user-supplied Transformer.
Implementations must be thread-safe! It is recommended they are also stateless.
- Manik Surtani
java.lang.Object fromString(java.lang.String str)Transforms a String into an Object.
str- cannot be null
- the Object that is encoded in the given String
java.lang.String toString(java.lang.Object obj)Transforms an Object into a String.
obj- cannot be null
- the String representation of the object