public class ReadableBytesTypeConverter extends java.lang.Object implements FormattingTypeConverter<java.lang.CharSequence,java.lang.Number,ReadableBytes>
Constructor and Description |
---|
ReadableBytesTypeConverter() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<ReadableBytes> |
annotationType() |
java.util.Optional<java.lang.Number> |
convert(java.lang.CharSequence object,
java.lang.Class<java.lang.Number> targetType,
ConversionContext context)
Converts from the given source object type to the target type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert, of
public java.lang.Class<ReadableBytes> annotationType()
annotationType
in interface FormattingTypeConverter<java.lang.CharSequence,java.lang.Number,ReadableBytes>
public java.util.Optional<java.lang.Number> convert(java.lang.CharSequence object, java.lang.Class<java.lang.Number> targetType, ConversionContext context)
TypeConverter
Optional.empty()
in case the object is not convertible by catching any necessary exceptions and failing gracefully.convert
in interface TypeConverter<java.lang.CharSequence,java.lang.Number>
object
- The object typetargetType
- The target type being converted tocontext
- The ConversionContext