public class DefaultConversionPath<F,T> extends Object implements ConversionPath<F,T>
| Modifier and Type | Method and Description |
|---|---|
<X> ConversionPath<F,X> |
append(ConversionStep<T,X> following)
Create a new ConversionPath by adding the given ConversionStep.
|
boolean |
contains(Class<?> from)
Test if this ConversionPath contains a conversion
from the given Class.
|
T |
convert(F from,
ArooaConverter converter)
Convert the given object using the ConversionPath.
|
Class<F> |
getFromClass()
Get the from Class of this ConversionPath.
|
<X,Y> ConversionStep<X,Y> |
getStep(int step)
Get the conversion step for the given index.
|
Class<T> |
getToClass()
Get the to Class of this ConversionPath.
|
static <X> ConversionPath<X,X> |
instance(Class<X> start) |
int |
length()
Get the number of Steps in this ConversionPath.
|
<X> ConversionPath<X,T> |
prepend(ConversionStep<X,F> preceeding)
Create a new ConversionPath by prepending the given ConversionStep.
|
String |
toString() |
public static <X> ConversionPath<X,X> instance(Class<X> start)
public <X> ConversionPath<F,X> append(ConversionStep<T,X> following)
ConversionPathappend in interface ConversionPath<F,T>public <X> ConversionPath<X,T> prepend(ConversionStep<X,F> preceeding)
ConversionPathprepend in interface ConversionPath<F,T>public Class<F> getFromClass()
ConversionPathgetFromClass in interface ConversionPath<F,T>public Class<T> getToClass()
ConversionPathgetToClass in interface ConversionPath<F,T>public int length()
ConversionPathlength in interface ConversionPath<F,T>public boolean contains(Class<?> from)
ConversionPathcontains in interface ConversionPath<F,T>public <X,Y> ConversionStep<X,Y> getStep(int step)
ConversionPathgetStep in interface ConversionPath<F,T>step - The index.public T convert(F from, ArooaConverter converter) throws ConversionFailedException
convert in interface ConversionPath<F,T>from - ConvertletExceptionConversionFailedExceptionCopyright © 2023. All rights reserved.