Package com.github.mizool.core
Class Streams
- java.lang.Object
-
- com.github.mizool.core.Streams
-
public final class Streams extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> BinaryOperator<T>expectingEqualValues()Accumulator forStream.reduce(BinaryOperator)that expects all values of theStreamto be equal to each other according toObjects.equals(Object, Object).
AReductionExceptionwill be thrown during reduction if one or more of the values in theStreamare not equal according toObjects.equals(Object, Object).static <T> Stream<T>parallel(Iterable<T> iterable)static <T> Stream<T>sequential(Iterable<T> iterable)
-
-
-
Method Detail
-
expectingEqualValues
public static <T> BinaryOperator<T> expectingEqualValues()
Accumulator forStream.reduce(BinaryOperator)that expects all values of theStreamto be equal to each other according toObjects.equals(Object, Object).
AReductionExceptionwill be thrown during reduction if one or more of the values in theStreamare not equal according toObjects.equals(Object, Object).
-
-