Package dev.enola.data.id
Class IdConverterChain
java.lang.Object
dev.enola.data.id.IdConverterChain
- All Implemented Interfaces:
BiConverter<Object,,String> Converter<String,,Optional<Object>> ConverterInto<Object,,Appendable> ConverterIntoAppendable<Object>,ObjectClassConverter<Object>,ObjectToStringBiConverter<Object>,OptionalConverter<String,,Object> IdConverter<Object>
IdConverterChain is an
IdConverter which delegates to a list of other such converters.-
Constructor Summary
ConstructorsConstructorDescriptionIdConverterChain(IdConverter<?>... converters) IdConverterChain(Iterable<IdConverter<?>> converters) -
Method Summary
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
convertIntoOrThrowMethods inherited from interface dev.enola.data.id.IdConverter
convertFromMethods inherited from interface dev.enola.common.convert.ObjectToStringBiConverter
convertObjectToType, convertToType
-
Constructor Details
-
IdConverterChain
-
IdConverterChain
-
-
Method Details
-
convertInto
Description copied from interface:ConverterIntoConvert from an I into an O.- Specified by:
convertIntoin interfaceConverterInto<Object,Appendable> - Specified by:
convertIntoin interfaceConverterIntoAppendable<Object>- Specified by:
convertIntoin interfaceObjectToStringBiConverter<Object>- 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
-
convertTo
- Specified by:
convertToin interfaceBiConverter<Object,String> - Specified by:
convertToin interfaceIdConverter<Object>- Throws:
ConversionException
-
convert
-
idClass
- Specified by:
idClassin interfaceIdConverter<Object>
-