Package dev.enola.common.convert
Class ConverterIntoChain<I,O>
java.lang.Object
dev.enola.common.convert.ConverterIntoChain<I,O>
- Type Parameters:
I- the type of input objects to convert fromO- the type of output objects to convert into
- All Implemented Interfaces:
ConverterInto<I,O>
- Direct Known Subclasses:
ResourceConverterChain
A "chain" of
ConverterIntos. It attempts the conversion in order until one is successful.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconvertInto(I from, O into) Convert from an I into an O.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.enola.common.convert.ConverterInto
convertIntoOrThrow
-
Constructor Details
-
ConverterIntoChain
-
-
Method Details
-
convertInto
Description copied from interface:ConverterIntoConvert from an I into an O.- Specified by:
convertIntoin interfaceConverterInto<I,O> - Parameters:
from- the input to convertinto- the destination where to output- Returns:
- true if conversion was successful, false if this converter cannot handle it; see
ConverterIntoChain - Throws:
ConversionException- in case of conversion problems or technical failures to read from I or write to OIOException- TODO wrap IOException into ConversionException and remove throws
-