Top Description Fields Methods
org.fxmisc.richtext.model

pack-priv Interface SuperCodec<S, T extends S>

extends Codec<T extends S>
Type Parameters
<S>
the super class type
<T>
the regular class type
Imports
java.io.DataInputStream, .DataOutputStream, .IOException, java.util.ArrayList, .Collection, .List

Codec that can serialize an object and its super class; helpful when using generics and captures.

Field Summary

Inherited from org.fxmisc.richtext.model.Codec:
COLOR_CODECSTRING_CODEC

Method Summary

Modifier and TypeMethod and Description
public static <T> SuperCodec<Collection<T>, List<T>>
collectionListCodec(Codec<T> elemCodec)

public default void
public void
public static <S, U extends S, T extends U> SuperCodec<S, U>
upCast(SuperCodec<S, T> sc)

Returns a codec that can serialize sc's type's super class

Inherited from org.fxmisc.richtext.model.Codec:
collectionCodecdecodeeitherCodecenumCodecgetNamelistCodecoptionalCodecstyledSegmentCodecstyledTextCodec

Method Detail

collectionListCodecback to summary
public static <T> SuperCodec<Collection<T>, List<T>> collectionListCodec(Codec<T> elemCodec)
encodeback to summary
public default void encode(DataOutputStream os, T t) throws IOException

Implements org.fxmisc.richtext.model.Codec.encode.

Annotations
@Override
encodeSuperback to summary
public void encodeSuper(DataOutputStream os, S s) throws IOException
upCastback to summary
public static <S, U extends S, T extends U> SuperCodec<S, U> upCast(SuperCodec<S, T> sc)

Returns a codec that can serialize sc's type's super class

Annotations
@SuppressWarnings:unchecked