ColoredText () { flushLastFragment(); int size = myFragments.size(); if (size == 0) { return ColoredTextImpl.EMPTY; } else if (size == 1) { return new ColoredTextImpl(myFragments.get(0)); } else { return new ColoredTextImpl(myFragments); } }