Search in sources :

Example 1 with MutableShortSet

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

the class AbstractImmutableSet method collectShort.

@Override
public ImmutableShortSet collectShort(ShortFunction<? super T> shortFunction) {
    MutableShortSet result = new ShortHashSet(this.size());
    this.forEach(new CollectShortProcedure<>(shortFunction, result));
    return result.toImmutable();
}
Also used : MutableShortSet(org.eclipse.collections.api.set.primitive.MutableShortSet) ShortHashSet(org.eclipse.collections.impl.set.mutable.primitive.ShortHashSet)

Example 2 with MutableShortSet

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

the class AbstractMutableSet method collectShort.

@Override
public MutableShortSet collectShort(ShortFunction<? super T> shortFunction) {
    MutableShortSet result = new ShortHashSet(this.size());
    this.forEach(new CollectShortProcedure<>(shortFunction, result));
    return result;
}
Also used : MutableShortSet(org.eclipse.collections.api.set.primitive.MutableShortSet) ShortHashSet(org.eclipse.collections.impl.set.mutable.primitive.ShortHashSet)

Aggregations

MutableShortSet (org.eclipse.collections.api.set.primitive.MutableShortSet)2 ShortHashSet (org.eclipse.collections.impl.set.mutable.primitive.ShortHashSet)2