/** * Finds all {@link NonPrimitiveType}s that start with given string. * * @param fqnWildCard * String that class should start with. * @return All types starting with the given string. */ public Collection<E> findStartsWith(String fqnWildCard) { long minMaxIndex = findStartsWithMinMaxIndexes(fqnWildCard); int min = getLowerInt(minMaxIndex); int max = getUpperInt(minMaxIndex); if (min < 0) { return Collections.emptyList(); } int size = size(); List<E> results = new ArrayList<>((max - min) + 1); for (int i = min; (i <= max) && (max < size); i++) { results.add(getAt(i)); } return results; }