Package dev.enola.common.convert
Class ObjectToStringWithToStringBiConverter<T>
java.lang.Object
dev.enola.common.convert.ObjectToStringWithToStringBiConverter<T>
- All Implemented Interfaces:
BiConverter<T,
,String> ConverterInto<T,
,Appendable> ConverterIntoAppendable<T>
,ObjectClassConverter<T>
,ObjectToStringBiConverter<T>
@Immutable
public class ObjectToStringWithToStringBiConverter<T>
extends Object
implements ObjectToStringBiConverter<T>
An ObjectToStringBiConverter which uses
Object.toString()
for BiConverter.convertTo(Object)
, and which also checks the type to convert from.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable T
convertFrom
(@Nullable String input) final String
<X> Optional
<X> convertToType
(T input, Class<X> type) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.enola.common.convert.ConverterInto
convertIntoOrThrow
Methods inherited from interface dev.enola.common.convert.ObjectToStringBiConverter
convertInto, convertObjectToType
-
Constructor Details
-
ObjectToStringWithToStringBiConverter
-
-
Method Details
-
convertToType
- Specified by:
convertToType
in interfaceObjectClassConverter<T>
- Specified by:
convertToType
in interfaceObjectToStringBiConverter<T>
- Throws:
IOException
-
convertTo
- Specified by:
convertTo
in interfaceBiConverter<T,
String> - Throws:
ConversionException
-
convertFrom
- Specified by:
convertFrom
in interfaceBiConverter<T,
String> - Throws:
ConversionException
-