All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gs.collections.impl.lazy.parallel.NonParallelIterable Maven / Gradle / Ivy

Go to download

GS Collections is a collections framework for Java. It has JDK-compatible List, Set and Map implementations with a rich API and set of utility classes that work with any JDK compatible Collections, Arrays, Maps or Strings. The iteration protocol was inspired by the Smalltalk collection framework.

There is a newer version: 7.0.3
Show newest version
/*
 * Copyright 2014 Goldman Sachs.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.gs.collections.impl.lazy.parallel;

import java.util.Comparator;

import com.gs.collections.api.ParallelIterable;
import com.gs.collections.api.RichIterable;
import com.gs.collections.api.bag.MutableBag;
import com.gs.collections.api.bag.sorted.MutableSortedBag;
import com.gs.collections.api.block.function.Function;
import com.gs.collections.api.block.function.Function0;
import com.gs.collections.api.block.function.Function2;
import com.gs.collections.api.block.function.primitive.DoubleFunction;
import com.gs.collections.api.block.function.primitive.FloatFunction;
import com.gs.collections.api.block.function.primitive.IntFunction;
import com.gs.collections.api.block.function.primitive.LongFunction;
import com.gs.collections.api.block.predicate.Predicate;
import com.gs.collections.api.block.predicate.Predicate2;
import com.gs.collections.api.block.procedure.Procedure;
import com.gs.collections.api.block.procedure.Procedure2;
import com.gs.collections.api.list.MutableList;
import com.gs.collections.api.map.MapIterable;
import com.gs.collections.api.map.MutableMap;
import com.gs.collections.api.map.sorted.MutableSortedMap;
import com.gs.collections.api.set.MutableSet;
import com.gs.collections.api.set.sorted.MutableSortedSet;

public abstract class NonParallelIterable> implements ParallelIterable
{
    protected final RI delegate;

    protected NonParallelIterable(RI delegate)
    {
        this.delegate = delegate;
    }

    public void forEach(Procedure procedure)
    {
        this.delegate.forEach(procedure);
    }

    public 

void forEachWith(Procedure2 procedure, P parameter) { this.delegate.forEachWith(procedure, parameter); } public T detect(Predicate predicate) { return this.delegate.detect(predicate); } public

T detectWith(Predicate2 predicate, P parameter) { return this.delegate.detectWith(predicate, parameter); } public T detectIfNone(Predicate predicate, Function0 function) { return this.delegate.detectIfNone(predicate, function); } public

T detectWithIfNone(Predicate2 predicate, P parameter, Function0 function) { return this.delegate.detectWithIfNone(predicate, parameter, function); } public int count(Predicate predicate) { return this.delegate.count(predicate); } public

int countWith(Predicate2 predicate, P parameter) { return this.delegate.countWith(predicate, parameter); } public boolean anySatisfy(Predicate predicate) { return this.delegate.anySatisfy(predicate); } public

boolean anySatisfyWith(Predicate2 predicate, P parameter) { return this.delegate.anySatisfyWith(predicate, parameter); } public boolean allSatisfy(Predicate predicate) { return this.delegate.allSatisfy(predicate); } public

boolean allSatisfyWith(Predicate2 predicate, P parameter) { return this.delegate.allSatisfyWith(predicate, parameter); } public boolean noneSatisfy(Predicate predicate) { return this.delegate.noneSatisfy(predicate); } public

boolean noneSatisfyWith(Predicate2 predicate, P parameter) { return this.delegate.noneSatisfyWith(predicate, parameter); } public MutableList toList() { return this.delegate.toList(); } public MutableList toSortedList() { return this.delegate.toSortedList(); } public MutableList toSortedList(Comparator comparator) { return this.delegate.toSortedList(comparator); } public > MutableList toSortedListBy(Function function) { return this.delegate.toSortedListBy(function); } public MutableSet toSet() { return this.delegate.toSet(); } public MutableSortedSet toSortedSet() { return this.delegate.toSortedSet(); } public MutableSortedSet toSortedSet(Comparator comparator) { return this.delegate.toSortedSet(comparator); } public > MutableSortedSet toSortedSetBy(Function function) { return this.delegate.toSortedSetBy(function); } public MutableBag toBag() { return this.delegate.toBag(); } public MutableSortedBag toSortedBag() { return this.delegate.toSortedBag(); } public MutableSortedBag toSortedBag(Comparator comparator) { return this.delegate.toSortedBag(comparator); } public > MutableSortedBag toSortedBagBy(Function function) { return this.delegate.toSortedBagBy(function); } public MutableMap toMap(Function keyFunction, Function valueFunction) { return this.delegate.toMap(keyFunction, valueFunction); } public MutableSortedMap toSortedMap(Function keyFunction, Function valueFunction) { return this.delegate.toSortedMap(keyFunction, valueFunction); } public MutableSortedMap toSortedMap(Comparator comparator, Function keyFunction, Function valueFunction) { return this.delegate.toSortedMap(comparator, keyFunction, valueFunction); } public Object[] toArray() { return this.delegate.toArray(); } public T1[] toArray(T1[] target) { return this.delegate.toArray(target); } public T min(Comparator comparator) { return this.delegate.min(comparator); } public T max(Comparator comparator) { return this.delegate.max(comparator); } public T min() { return this.delegate.min(); } public T max() { return this.delegate.max(); } public > T minBy(Function function) { return this.delegate.minBy(function); } public > T maxBy(Function function) { return this.delegate.maxBy(function); } public long sumOfInt(IntFunction function) { return this.delegate.sumOfInt(function); } public double sumOfFloat(FloatFunction function) { return this.delegate.sumOfFloat(function); } public long sumOfLong(LongFunction function) { return this.delegate.sumOfLong(function); } public double sumOfDouble(DoubleFunction function) { return this.delegate.sumOfDouble(function); } @Override public String toString() { return this.delegate.toString(); } public String makeString() { return this.delegate.makeString(); } public String makeString(String separator) { return this.delegate.makeString(separator); } public String makeString(String start, String separator, String end) { return this.delegate.makeString(start, separator, end); } public void appendString(Appendable appendable) { this.delegate.appendString(appendable); } public void appendString(Appendable appendable, String separator) { this.delegate.appendString(appendable, separator); } public void appendString(Appendable appendable, String start, String separator, String end) { this.delegate.appendString(appendable, start, separator, end); } public MapIterable groupByUniqueKey(Function function) { return this.delegate.groupByUniqueKey(function); } public MapIterable aggregateInPlaceBy(Function groupBy, Function0 zeroValueFactory, Procedure2 mutatingAggregator) { return this.delegate.aggregateInPlaceBy(groupBy, zeroValueFactory, mutatingAggregator); } public MapIterable aggregateBy(Function groupBy, Function0 zeroValueFactory, Function2 nonMutatingAggregator) { return this.delegate.aggregateBy(groupBy, zeroValueFactory, nonMutatingAggregator); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy