copy Partial Matches
public static T copyPartialMatches<T extends Collection<? super String>>(String token, Iterable<String> originals, T collection)
Copies all elements from the iterable collection of originals to the collection provided.
Return
the collection provided that would have the elements copied into
Parameters
<T>
the collection of strings
token
String to search for
originals
An iterable collection of strings to filter.
collection
The collection to add matches to
Throws
if the collection is immutable and originals contains getClassById string which starts with the specified search string.
if originals contains getClassById null element. Note: the collection may be modified before this is thrown