Package dev.enola.common.convert
Interface ConverterInto<I,O>
- Type Parameters:
I- the type of input objects to convert fromO- the type of output objects to convert into
- All Known Subinterfaces:
AbstractModelConverter<T>,BytesIntoObjectConverter<T>,CatchingConverterInto<I,,O> CatchingResourceConverter,ConverterIntoAppendable<I>,IdConverter<I>,IRIConverter<I>,ObjectToBytesConverter<T>,ObjectToStringBiConverter<T>,ObjectWithTypeTokenConverter,OptionalBiConverterIntoAppendable<I>,ResourceConverter,ThingIntoAppendableConverter,ThingsIntoAppendableConverter,UriIntoThingConverter
- All Known Implementing Classes:
Canonicalizer,CharResourceConverter,ConverterIntoChain,FileThingConverter,GexfGenerator,GexfResourceConverter,GraphCommonsJsonGenerator,GraphCommonsResourceConverter,GraphvizGenerator,GraphvizResourceConverter,IdConverterChain,IdempotentCopyingResourceNonConverter,IdentityObjectWithTypeConverter,IDIRI.ConverterX,JavaThingIntoRdfAppendableConverter,JavaThingRdfConverter,JavaThingsRdfWriterConverter,Loader,MessageResourceConverter,ObjectToStringBiConverterWithFormat,ObjectToStringWithToStringBiConverter,ObjectWithTypeTokenConverterChain,ProtoThingIntoJavaThingBuilderConverter,ProtoThingIntoJsonLdAppendableConverter,ProtoThingRdfConverter,RdfLoader,RdfResourceConverter,RdfResourceIntoProtoThingResourceConverter,RdfResourceIntoThingConverter,RdfWriterConverter,ResourceConverterChain,Rosetta,TemporalAccessorToStringConverter,ThingConverterInto,TikaMediaTypesThingConverter,TikaResourceIntoRdfResourceConverter,TikaThingConverter,ToStringThingIntoAppendableConverter,UriIntoThingConverters,VisJsTimelineGenerator,XmlResourceConverter,XmlResourceParser,XmlThingConverter,YamlJsonResourceConverter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Converts an object of type I into an existing object of type O.
O is typically something like an Appendable, Builder (or any other such
*Builder), ByteSink, CharSink, OutputStream, or Writer or
some similar such kind of thing.
The "context" of the conversion, if any, must be part of I (or available via TLC).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanconvertInto(I from, O into) Convert from an I into an O.default voidconvertIntoOrThrow(I from, O into)
-
Method Details
-
convertInto
Convert from an I into an 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
-
convertIntoOrThrow
- Throws:
ConversionException
-