public interface ConvertValue
Modifier and Type | Method and Description |
---|---|
<T> T |
convertValue(Object from,
Class<T> clazz)
This function is called when trying to convert the results of
Item.asMap() into the Index's parameterized class type, or
when doing the opposite: preparing for a call to Item.fromMap().
|
<T> T convertValue(Object from, Class<T> clazz) throws Exception
ObjectMapper om = ...; _indexFactory.create() .withConvertValue(om::convertValue) ...;
T
- is the type to convert into.from
- is the object to be converted.clazz
- is the type to convert to.Exception
- so the implementation is free to throw checked
exceptions.Copyright © 2017. All rights reserved.