RTEditor/src/main/java/com/onegravity/rteditor/api/format/RTText.java
public RTText convertTo(RTFormat destFormat, RTMediaFactory<RTImage, RTAudio, RTVideo> mediaFactory) {
        if (destFormat == mRTFormat) {
            return this;
        }

        throw new UnsupportedOperationException("Can't convert from "
                + mRTFormat.getClass().getSimpleName() + " to "
                + destFormat.getClass().getSimpleName());
    }
public RTText convertTo(RTFormat destFormat, RTMediaFactory<RTImage, RTAudio, RTVideo> mediaFactory) {
        if (destFormat == mRTFormat) {
            return this;
        }

        throw new UnsupportedOperationException("Can't convert from "
                + mRTFormat.getClass().getSimpleName() + " to "
                + destFormat.getClass().getSimpleName());
    }
public RTText convertTo ( RTFormat destFormat , RTMediaFactory < RTImage , RTAudio , RTVideo > mediaFactory ) { if ( destFormat == mRTFormat ) { return this ; } throw new UnsupportedOperationException ( "Can't convert from " + mRTFormat . getClass ( ) . getSimpleName ( ) + " to " + destFormat . getClass ( ) . getSimpleName ( ) ) ; }
Converts this rich text to another rich text. The default implementation
doesn't support any conversion except the one to itself (which is
technically no conversion).
<p>
The method has to make sure that the original rich text isn't modified.
It does however not make sure that the returned RTText isn't referencing
the original RTText meaning modifying the resulting object might also
modify the original object.

@param destFormat   The rich text we want to convert to.
@param mediaFactory The media factory we might need for the conversion.
@return The converted RTText
@throws UnsupportedOperationException if this RTText doesn't support the conversion.
Converts this rich text to another rich text . The default implementation doesn t support any conversion except the one to itself ( which is technically no conversion ) . <p > The method has to make sure that the original rich text isn t modified . It does however not make sure that the returned RTText isn t referencing the original RTText meaning modifying the resulting object might also modify the original object .