public class CombiningLeafValueHandler extends Object implements LeafValueHandler
LeafValueHandler which takes various implementations thereof and
returns the first non-null result of the underlying leaf value handlers.| Constructor and Description |
|---|
CombiningLeafValueHandler(Collection<LeafValueHandler> handlers)
Constructor.
|
CombiningLeafValueHandler(LeafValueHandler... handlers)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
convert(TypeInformation typeInformation,
Object value)
Converts the given value to the given class, if possible.
|
protected Collection<LeafValueHandler> |
getHandlers() |
Object |
toExportValue(Object value)
Converts the given value to a type more suitable for exporting.
|
public CombiningLeafValueHandler(LeafValueHandler... handlers)
handlers - the handlers to delegate each call to (in the given order)public CombiningLeafValueHandler(Collection<LeafValueHandler> handlers)
handlers - the handlers to delegate each call to (in the iteration order of the collection)public Object convert(TypeInformation typeInformation, Object value)
LeafValueHandlernull or an object of the class type.convert in interface LeafValueHandlertypeInformation - the required typevalue - the value to convertpublic Object toExportValue(Object value)
LeafValueHandlerProperty.toExportValue(T) is called on a bean property.
Returns null if the leaf value handler cannot handle the value.
Return MapperImpl.RETURN_NULL to signal that null should be used
as the export value (returning null itself means this leaf value handler cannot handle it).
toExportValue in interface LeafValueHandlervalue - the value to convert to an export value, if possibleprotected final Collection<LeafValueHandler> getHandlers()
Copyright © 2016–2018 The AuthMe Team. All rights reserved.