Search in sources :

Example 6 with CharHashSet

use of org.eclipse.collections.impl.set.mutable.primitive.CharHashSet in project eclipse-collections by eclipse.

the class CharAdapter method toSet.

@Override
public MutableCharSet toSet() {
    int size = this.size();
    CharHashSet set = new CharHashSet(size);
    for (int i = 0; i < size; i++) {
        set.add(this.get(i));
    }
    return set;
}
Also used : CharHashSet(org.eclipse.collections.impl.set.mutable.primitive.CharHashSet)

Aggregations

CharHashSet (org.eclipse.collections.impl.set.mutable.primitive.CharHashSet)6 MutableCharSet (org.eclipse.collections.api.set.primitive.MutableCharSet)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Test (org.junit.Test)1