I have a generic class which represents a fragment of text. That fragment of text may have any of a number of different modes (different types of highlighting). Those mode
Without testing, I'd guess:
public class TextFragment> {
Hmm, short test shows it doesn't seem to work either...