return clone(array);
}
final HashMap<Character, MutableInt> occurrences = new HashMap<Character, MutableInt>(values.length);
for (final char v : values) {
final Character boxed = Character.valueOf(v);
final MutableInt count = occurrences.get(boxed);
if (count == null) {
occurrences.put(boxed, new MutableInt(1));
} else {
count.increment();
}
}
final BitSet toRemove = new BitSet();
for (final Map.Entry<Character, MutableInt> e : occurrences.entrySet()) {
final Character v = e.getKey();