Code example for LinkedHashSet

Methods: size, toArray

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()]);
	} 
}