Search in sources :

Example 1 with MutableCharSet

use of org.eclipse.collections.api.set.primitive.MutableCharSet in project eclipse-collections by eclipse.

the class AbstractMutableSet method collectChar.

@Override
public MutableCharSet collectChar(CharFunction<? super T> charFunction) {
    MutableCharSet result = new CharHashSet(this.size());
    this.forEach(new CollectCharProcedure<>(charFunction, result));
    return result;
}
Also used : MutableCharSet(org.eclipse.collections.api.set.primitive.MutableCharSet) CharHashSet(org.eclipse.collections.impl.set.mutable.primitive.CharHashSet)

Example 2 with MutableCharSet

use of org.eclipse.collections.api.set.primitive.MutableCharSet in project eclipse-collections by eclipse.

the class AbstractImmutableSet method collectChar.

@Override
public ImmutableCharSet collectChar(CharFunction<? super T> charFunction) {
    MutableCharSet result = new CharHashSet(this.size());
    this.forEach(new CollectCharProcedure<>(charFunction, result));
    return result.toImmutable();
}
Also used : MutableCharSet(org.eclipse.collections.api.set.primitive.MutableCharSet) CharHashSet(org.eclipse.collections.impl.set.mutable.primitive.CharHashSet)

Aggregations

MutableCharSet (org.eclipse.collections.api.set.primitive.MutableCharSet)2 CharHashSet (org.eclipse.collections.impl.set.mutable.primitive.CharHashSet)2