Here you can find the source of addMatchingStrings(Collection
public static void addMatchingStrings(Collection<String> availableProperties, String startWith, Collection<String> strings)
//package com.java2s; //License from project: LGPL import java.util.Collection; public class Main { public static void addMatchingStrings(Collection<String> availableProperties, String startWith, Collection<String> strings) { for (String string : strings) if (string.startsWith(startWith)) availableProperties.add(string); }//ww w . jav a 2 s. c om }