void () { if (myLastFragmentAttributes != null) { myFragments.add(new ColoredTextFragmentImpl(myLastFragmentTextBuilder.toString(), myLastFragmentAttributes)); myLastFragmentTextBuilder.setLength(0); myLastFragmentAttributes = null; } }