List<SubstitutionChunk> (@NotNull List<? extends FormatStringChunk> chunks) { final List<SubstitutionChunk> results = new ArrayList<>(); for (FormatStringChunk chunk : chunks) { if (chunk instanceof SubstitutionChunk) { results.add((SubstitutionChunk)chunk); } } return results; }