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(@NotNull Collection<LeafValueHandler> handlers)
Constructor.
|
CombiningLeafValueHandler(LeafValueHandler... handlers)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable Object |
convert(@NotNull TypeInformation typeInformation,
@Nullable Object value)
Converts the given value to the given class, if possible.
|
protected @NotNull Collection<LeafValueHandler> |
getHandlers() |
@Nullable Object |
toExportValue(@Nullable Object value)
Converts the given value to a type more suitable for exporting.
|
public CombiningLeafValueHandler(@NotNull
LeafValueHandler... handlers)
handlers - the handlers to delegate each call to (in the given order)public CombiningLeafValueHandler(@NotNull
@NotNull Collection<LeafValueHandler> handlers)
handlers - the handlers to delegate each call to (in the iteration order of the collection)@Nullable public @Nullable Object convert(@NotNull @NotNull TypeInformation typeInformation, @Nullable @Nullable Object value)
LeafValueHandlernull or an object of the class type.convert in interface LeafValueHandlertypeInformation - the required typevalue - the value to convert@Nullable public @Nullable Object toExportValue(@Nullable @Nullable 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 possible@NotNull protected final @NotNull Collection<LeafValueHandler> getHandlers()
Copyright © 2016–2023 The AuthMe Team. All rights reserved.