Package com.dua3.utility.text
Class AttributeBasedConverter<T>
java.lang.Object
com.dua3.utility.text.AttributeBasedConverter<T>
- Type Parameters:
T
- target type of conversion
- All Implemented Interfaces:
RichTextConverter<T>
- Direct Known Subclasses:
AnsiConverter
,StyledDocumentConverter
Base class for attribute-based converters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Abstract base class for the attribute-based converter implementation classes. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor for theAttributeBasedConverter
class. -
Method Summary
Modifier and TypeMethodDescriptionConvertRichText
instance to the target class.protected abstract AttributeBasedConverter.AttributeBasedConverterImpl
<T> createConverter
(RichText text) Factory method to create a compatible converter implementation instance for this converter.
-
Constructor Details
-
AttributeBasedConverter
protected AttributeBasedConverter()Constructor for theAttributeBasedConverter
class.
-
-
Method Details
-
createConverter
protected abstract AttributeBasedConverter.AttributeBasedConverterImpl<T> createConverter(RichText text) Factory method to create a compatible converter implementation instance for this converter.- Parameters:
text
- the text to be converted- Returns:
- instance of the implementation class
-
convert
ConvertRichText
instance to the target class.- Specified by:
convert
in interfaceRichTextConverter<T>
- Parameters:
text
- the text to convert- Returns:
- the conversion result
-