Code example for LinkedHashSet

Methods: sizetoArray

0
public class DuplicateRemoverImpl implements DuplicateRemover { 
	@Override 
	public String[] removeDuplicateStrings(final String... array) {
		if (array == null) return null;
 
		final Collection<String> strings = new LinkedHashSet<String>(Arrays.asList(array));
		return strings.toArray(new String[strings.size()]);
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE