Interface Converter<I,O>

Type Parameters:
I - the input type
O - the output type
All Known Subinterfaces:
AbstractModelConverter<T>, BytesToObjectConverter<T>, IdConverter<I>, IRIConverter<I>, ObjectToStringConverter, ObjectToValueConverter, OptionalBiConverterIntoAppendable<I>, OptionalConverter<I,O>, ResourceIntoProtoThingConverter
All Known Implementing Classes:
FilteringResourceIntoProtoThingConverter, IdConverterChain, IDIRI.ConverterX, JavaThingRdfConverter, JavaThingToProtoThingConverter, MessageToThingConverter, OptionalConverterChain, ProtoThingRdfConverter, RdfProtoThingsConverter, RdfReaderConverter, RdfResourceIntoProtoThingConverter, TemporalToXmlStringConverter
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Converter<I,O>
Converts an object of type I to a new object of type O.

The "context" of the conversion, if any, must be part of I.

For #efficiency, consider whether this or a ConverterInto is more suitable.

Converter implementations "have" to convert, and should never return null; if they may or may not convert depending on I, then implement an OptionalConverter instead of throwing a ConversionException.

BiConverter is a bi-directional alternative to this.

  • Method Summary

    Modifier and Type
    Method
    Description
    convert(I input)