public final class ConvertUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <TInput,TOutput> |
applyData(TInput data,
Consumer<TOutput> consumer,
Function<TInput,TOutput> converter)
Tries to apply the given string as data to the consumer interfaces using the given converter to parse the data
into the desired type.
|
static <TInput,TOutput> |
applyData(TInput data,
Consumer<TOutput> consumer,
Function<TInput,TOutput> converter,
Function<TInput,Boolean> validator)
Tries to apply the given string as data to the consumer interfaces using the given converter to parse the data
into the desired type.
|
static <TInput,TOutput> |
convert(TInput data,
Function<TInput,TOutput> converter,
Function<TInput,Boolean> validator)
Tries to convert the given data into the output type.
|
public static <TInput,TOutput> void applyData(TInput data,
Consumer<TOutput> consumer,
Function<TInput,TOutput> converter)
TInput - type of the incoming dataTOutput - type of the output datadata - data to be usedconsumer - consumer which will use that converted dataconverter - converter which will parse the provided data into the desired typepublic static <TInput,TOutput> void applyData(TInput data,
Consumer<TOutput> consumer,
Function<TInput,TOutput> converter,
Function<TInput,Boolean> validator)
throws IllegalArgumentException
TInput - type of the incoming dataTOutput - type of the datadata - data to be usedconsumer - consumer which will use that converted dataconverter - converter which will parse the provided data into the desired typevalidator - validator to ensure th provided data is valid, may be null in which case no validation is
doneIllegalArgumentException - if the data is not valid according to the provided validatorpublic static <TInput,TOutput> TOutput convert(TInput data,
Function<TInput,TOutput> converter,
Function<TInput,Boolean> validator)
throws IllegalArgumentException
TInput - type of the incoming dataTOutput - type of the datadata - data to be usedconverter - converter which will parse the provided data into the desired typevalidator - validator to ensure th provided data is valid, may be null in which case no validation is
doneIllegalArgumentException - if the data is not valid according to the provided validatorCopyright © 2016 Saxonia Systems AG. All rights reserved.