Class ConstraintCollectors
UniConstraintCollector, BiConstraintCollector, ... instance
for use in UniConstraintStream.groupBy(Function, UniConstraintCollector), ...-
Method Summary
Modifier and TypeMethodDescriptionstatic <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Double> average(@NonNull ToIntQuadFunction<A, B, C, D> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Double> average(@NonNull ToIntTriFunction<A, B, C> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Double> average(@NonNull ToIntBiFunction<A, B> groupValueMapping) As defined byaverage(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, Double> average(@NonNull ToIntFunction<A> groupValueMapping) Returns a collector that calculates an average of anintproperty of the elements that are being grouped.static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, BigDecimal> averageBigDecimal(@NonNull QuadFunction<A, B, C, D, BigDecimal> groupValueMapping) As defined byaverageBigDecimal(Function).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, BigDecimal> averageBigDecimal(@NonNull TriFunction<A, B, C, BigDecimal> groupValueMapping) As defined byaverageBigDecimal(Function).static <A,B> @NonNull BiConstraintCollector<A, B, ?, BigDecimal> averageBigDecimal(@NonNull BiFunction<A, B, BigDecimal> groupValueMapping) As defined byaverageBigDecimal(Function).static <A> @NonNull UniConstraintCollector<A,?, BigDecimal> averageBigDecimal(@NonNull Function<A, BigDecimal> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, BigDecimal> averageBigInteger(@NonNull QuadFunction<A, B, C, D, BigInteger> groupValueMapping) As defined byaverageBigInteger(Function).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, BigDecimal> averageBigInteger(@NonNull TriFunction<A, B, C, BigInteger> groupValueMapping) As defined byaverageBigInteger(Function).static <A,B> @NonNull BiConstraintCollector<A, B, ?, BigDecimal> averageBigInteger(@NonNull BiFunction<A, B, BigInteger> groupValueMapping) As defined byaverageBigInteger(Function).static <A> @NonNull UniConstraintCollector<A,?, BigDecimal> averageBigInteger(@NonNull Function<A, BigInteger> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Duration> averageDuration(@NonNull QuadFunction<A, B, C, D, Duration> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Duration> averageDuration(@NonNull TriFunction<A, B, C, Duration> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Duration> averageDuration(@NonNull BiFunction<A, B, Duration> groupValueMapping) As defined byaverage(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, Duration> averageDuration(@NonNull Function<A, Duration> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Double> averageLong(@NonNull ToLongQuadFunction<A, B, C, D> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Double> averageLong(@NonNull ToLongTriFunction<A, B, C> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Double> averageLong(@NonNull ToLongBiFunction<A, B> groupValueMapping) As defined byaverage(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, Double> averageLong(@NonNull ToLongFunction<A> groupValueMapping) As defined byaverage(ToIntFunction).static <A,B, Intermediate_, Result_>
@NonNull BiConstraintCollector<A,B, ?, Result_> collectAndThen(@NonNull BiConstraintCollector<A, B, ?, Intermediate_> delegate, @NonNull Function<Intermediate_, Result_> mappingFunction) As defined bycollectAndThen(UniConstraintCollector, Function).static <A,B, C, D, Intermediate_, Result_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Result_> collectAndThen(@NonNull QuadConstraintCollector<A, B, C, D, ?, Intermediate_> delegate, @NonNull Function<Intermediate_, Result_> mappingFunction) As defined bycollectAndThen(UniConstraintCollector, Function).static <A,B, C, Intermediate_, Result_>
@NonNull TriConstraintCollector<A,B, C, ?, Result_> collectAndThen(@NonNull TriConstraintCollector<A, B, C, ?, Intermediate_> delegate, @NonNull Function<Intermediate_, Result_> mappingFunction) As defined bycollectAndThen(UniConstraintCollector, Function).static <A,Intermediate_, Result_>
@NonNull UniConstraintCollector<A,?, Result_> collectAndThen(@NonNull UniConstraintCollector<A, ?, Intermediate_> delegate, @NonNull Function<Intermediate_, Result_> mappingFunction) Returns a collector that delegates to the underlying collector and maps its result to another value.static <A,B, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResult1_, SubResult2_, SubResult3_>
@NonNull BiConstraintCollector<A,B, ?, Result_> compose(@NonNull BiConstraintCollector<A, B, SubResultContainer1_, SubResult1_> subCollector1, @NonNull BiConstraintCollector<A, B, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiConstraintCollector<A, B, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriFunction<SubResult1_, SubResult2_, SubResult3_, Result_> composeFunction) static <A,B, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResultContainer4_, SubResult1_, SubResult2_, SubResult3_, SubResult4_>
@NonNull BiConstraintCollector<A,B, ?, Result_> compose(@NonNull BiConstraintCollector<A, B, SubResultContainer1_, SubResult1_> subCollector1, @NonNull BiConstraintCollector<A, B, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiConstraintCollector<A, B, SubResultContainer3_, SubResult3_> subCollector3, @NonNull BiConstraintCollector<A, B, SubResultContainer4_, SubResult4_> subCollector4, @NonNull QuadFunction<SubResult1_, SubResult2_, SubResult3_, SubResult4_, Result_> composeFunction) static <A,B, Result_, SubResultContainer1_, SubResultContainer2_, SubResult1_, SubResult2_>
@NonNull BiConstraintCollector<A,B, ?, Result_> compose(@NonNull BiConstraintCollector<A, B, SubResultContainer1_, SubResult1_> subCollector1, @NonNull BiConstraintCollector<A, B, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiFunction<SubResult1_, SubResult2_, Result_> composeFunction) static <A,B, C, D, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResult1_, SubResult2_, SubResult3_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Result_> compose(@NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer1_, SubResult1_> subCollector1, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer2_, SubResult2_> subCollector2, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriFunction<SubResult1_, SubResult2_, SubResult3_, Result_> composeFunction) static <A,B, C, D, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResultContainer4_, SubResult1_, SubResult2_, SubResult3_, SubResult4_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Result_> compose(@NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer1_, SubResult1_> subCollector1, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer2_, SubResult2_> subCollector2, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer3_, SubResult3_> subCollector3, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer4_, SubResult4_> subCollector4, @NonNull QuadFunction<SubResult1_, SubResult2_, SubResult3_, SubResult4_, Result_> composeFunction) static <A,B, C, D, Result_, SubResultContainer1_, SubResultContainer2_, SubResult1_, SubResult2_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Result_> compose(@NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer1_, SubResult1_> subCollector1, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiFunction<SubResult1_, SubResult2_, Result_> composeFunction) static <A,B, C, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResult1_, SubResult2_, SubResult3_>
@NonNull TriConstraintCollector<A,B, C, ?, Result_> compose(@NonNull TriConstraintCollector<A, B, C, SubResultContainer1_, SubResult1_> subCollector1, @NonNull TriConstraintCollector<A, B, C, SubResultContainer2_, SubResult2_> subCollector2, @NonNull TriConstraintCollector<A, B, C, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriFunction<SubResult1_, SubResult2_, SubResult3_, Result_> composeFunction) static <A,B, C, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResultContainer4_, SubResult1_, SubResult2_, SubResult3_, SubResult4_>
@NonNull TriConstraintCollector<A,B, C, ?, Result_> compose(@NonNull TriConstraintCollector<A, B, C, SubResultContainer1_, SubResult1_> subCollector1, @NonNull TriConstraintCollector<A, B, C, SubResultContainer2_, SubResult2_> subCollector2, @NonNull TriConstraintCollector<A, B, C, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriConstraintCollector<A, B, C, SubResultContainer4_, SubResult4_> subCollector4, @NonNull QuadFunction<SubResult1_, SubResult2_, SubResult3_, SubResult4_, Result_> composeFunction) static <A,B, C, Result_, SubResultContainer1_, SubResultContainer2_, SubResult1_, SubResult2_>
@NonNull TriConstraintCollector<A,B, C, ?, Result_> compose(@NonNull TriConstraintCollector<A, B, C, SubResultContainer1_, SubResult1_> subCollector1, @NonNull TriConstraintCollector<A, B, C, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiFunction<SubResult1_, SubResult2_, Result_> composeFunction) static <A,Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResult1_, SubResult2_, SubResult3_>
@NonNull UniConstraintCollector<A,?, Result_> compose(@NonNull UniConstraintCollector<A, SubResultContainer1_, SubResult1_> subCollector1, @NonNull UniConstraintCollector<A, SubResultContainer2_, SubResult2_> subCollector2, @NonNull UniConstraintCollector<A, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriFunction<SubResult1_, SubResult2_, SubResult3_, Result_> composeFunction) Returns a constraint collector the result of which is a composition of other constraint collectors.static <A,Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResultContainer4_, SubResult1_, SubResult2_, SubResult3_, SubResult4_>
@NonNull UniConstraintCollector<A,?, Result_> compose(@NonNull UniConstraintCollector<A, SubResultContainer1_, SubResult1_> subCollector1, @NonNull UniConstraintCollector<A, SubResultContainer2_, SubResult2_> subCollector2, @NonNull UniConstraintCollector<A, SubResultContainer3_, SubResult3_> subCollector3, @NonNull UniConstraintCollector<A, SubResultContainer4_, SubResult4_> subCollector4, @NonNull QuadFunction<SubResult1_, SubResult2_, SubResult3_, SubResult4_, Result_> composeFunction) Returns a constraint collector the result of which is a composition of other constraint collectors.static <A,Result_, SubResultContainer1_, SubResultContainer2_, SubResult1_, SubResult2_>
@NonNull UniConstraintCollector<A,?, Result_> compose(@NonNull UniConstraintCollector<A, SubResultContainer1_, SubResult1_> subCollector1, @NonNull UniConstraintCollector<A, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiFunction<SubResult1_, SubResult2_, Result_> composeFunction) Returns a constraint collector the result of which is a composition of other constraint collectors.static <A,B, C, D, ResultContainer_, Result_>
@NonNull QuadConstraintCollector<A,B, C, D, ResultContainer_, Result_> conditionally(@NonNull QuadPredicate<A, B, C, D> condition, @NonNull QuadConstraintCollector<A, B, C, D, ResultContainer_, Result_> delegate) As defined byconditionally(Predicate, UniConstraintCollector).static <A,B, C, ResultContainer_, Result_>
@NonNull TriConstraintCollector<A,B, C, ResultContainer_, Result_> conditionally(@NonNull TriPredicate<A, B, C> condition, @NonNull TriConstraintCollector<A, B, C, ResultContainer_, Result_> delegate) As defined byconditionally(Predicate, UniConstraintCollector).static <A,B, ResultContainer_, Result_>
@NonNull BiConstraintCollector<A,B, ResultContainer_, Result_> conditionally(@NonNull BiPredicate<A, B> condition, @NonNull BiConstraintCollector<A, B, ResultContainer_, Result_> delegate) As defined byconditionally(Predicate, UniConstraintCollector).static <A,ResultContainer_, Result_>
@NonNull UniConstraintCollector<A,ResultContainer_, Result_> conditionally(@NonNull Predicate<A> condition, @NonNull UniConstraintCollector<A, ResultContainer_, Result_> delegate) Returns a collector that delegates to the underlying collector if and only if the input tuple meets the given condition.static <A> @NonNull UniConstraintCollector<A,?, Integer> count()Returns a collector that counts the number of elements that are being grouped.static <A,B> @NonNull BiConstraintCollector<A, B, ?, Integer> countBi()As defined bycount().static <A> @NonNull UniConstraintCollector<A,?, Integer> As defined bycountDistinct(Function), withFunction.identity()as the argument.static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Integer> countDistinct(@NonNull QuadFunction<A, B, C, D, ?> groupValueMapping) As defined bycountDistinct(Function).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Integer> countDistinct(@NonNull TriFunction<A, B, C, ?> groupValueMapping) As defined bycountDistinct(Function).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Integer> countDistinct(@NonNull BiFunction<A, B, ?> groupValueMapping) As defined bycountDistinct(Function).static <A> @NonNull UniConstraintCollector<A,?, Integer> countDistinct(@NonNull Function<A, ?> groupValueMapping) Returns a collector that counts the number of unique elements that are being grouped.static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Long> countDistinctLong(@NonNull QuadFunction<A, B, C, D, ?> groupValueMapping) As defined bycountDistinct(Function).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Long> countDistinctLong(@NonNull TriFunction<A, B, C, ?> groupValueMapping) As defined bycountDistinct(Function).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Long> countDistinctLong(@NonNull BiFunction<A, B, ?> groupValueMapping) As defined bycountDistinct(Function).static <A> @NonNull UniConstraintCollector<A,?, Long> countDistinctLong(@NonNull Function<A, ?> groupValueMapping) As defined bycountDistinct(Function).static <A> @NonNull UniConstraintCollector<A,?, Long> As defined bycount().static <A,B> @NonNull BiConstraintCollector<A, B, ?, Long> As defined bycount().static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Long> As defined bycount().static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Long> As defined bycount().static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Integer> As defined bycount().static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Integer> countTri()As defined bycount().static <A,B, C, D, Balanced_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, LoadBalance<Balanced_>> loadBalance(@NonNull QuadFunction<A, B, C, D, Balanced_> balancedItemFunction) As defined byloadBalance(QuadFunction, ToLongQuadFunction, ToLongQuadFunction), where the current load for each balanced item is set to one and the starting load for each balanced item is set to zero.static <A,B, C, D, Balanced_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, LoadBalance<Balanced_>> loadBalance(@NonNull QuadFunction<A, B, C, D, Balanced_> balancedItemFunction, @NonNull ToLongQuadFunction<A, B, C, D> loadFunction) As defined byloadBalance(QuadFunction, ToLongQuadFunction, ToLongQuadFunction), where the starting load for each balanced item is set to zero.static <A,B, C, D, Balanced_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, LoadBalance<Balanced_>> loadBalance(@NonNull QuadFunction<A, B, C, D, Balanced_> balancedItemFunction, @NonNull ToLongQuadFunction<A, B, C, D> loadFunction, @NonNull ToLongQuadFunction<A, B, C, D> initialLoadFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction).static <A,B, C, Balanced_>
@NonNull TriConstraintCollector<A,B, C, ?, LoadBalance<Balanced_>> loadBalance(@NonNull TriFunction<A, B, C, Balanced_> balancedItemFunction) As defined byloadBalance(TriFunction, ToLongTriFunction, ToLongTriFunction), where the current load for each balanced item is set to one and the starting load for each balanced item is set to zero.static <A,B, C, Balanced_>
@NonNull TriConstraintCollector<A,B, C, ?, LoadBalance<Balanced_>> loadBalance(@NonNull TriFunction<A, B, C, Balanced_> balancedItemFunction, @NonNull ToLongTriFunction<A, B, C> loadFunction) As defined byloadBalance(TriFunction, ToLongTriFunction, ToLongTriFunction), where the starting load for each balanced item is set to zero.static <A,B, C, Balanced_>
@NonNull TriConstraintCollector<A,B, C, ?, LoadBalance<Balanced_>> loadBalance(@NonNull TriFunction<A, B, C, Balanced_> balancedItemFunction, @NonNull ToLongTriFunction<A, B, C> loadFunction, @NonNull ToLongTriFunction<A, B, C> initialLoadFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction).static <A,B, Balanced_>
@NonNull BiConstraintCollector<A,B, ?, LoadBalance<Balanced_>> loadBalance(@NonNull BiFunction<A, B, Balanced_> balancedItemFunction) As defined byloadBalance(BiFunction, ToLongBiFunction, ToLongBiFunction), where the current load for each balanced item is set to one and the starting load for each balanced item is set to zero.static <A,B, Balanced_>
@NonNull BiConstraintCollector<A,B, ?, LoadBalance<Balanced_>> loadBalance(@NonNull BiFunction<A, B, Balanced_> balancedItemFunction, @NonNull ToLongBiFunction<A, B> loadFunction) As defined byloadBalance(BiFunction, ToLongBiFunction, ToLongBiFunction), where the starting load for each balanced item is set to zero.static <A,B, Balanced_>
@NonNull BiConstraintCollector<A,B, ?, LoadBalance<Balanced_>> loadBalance(@NonNull BiFunction<A, B, Balanced_> balancedItemFunction, @NonNull ToLongBiFunction<A, B> loadFunction, @NonNull ToLongBiFunction<A, B> initialLoadFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction).static <A,Balanced_>
@NonNull UniConstraintCollector<A,?, LoadBalance<Balanced_>> loadBalance(@NonNull Function<A, Balanced_> balancedItemFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction), where the current load for each balanced item is set to one and the starting load for each balanced item is set to zero.static <A,Balanced_>
@NonNull UniConstraintCollector<A,?, LoadBalance<Balanced_>> loadBalance(@NonNull Function<A, Balanced_> balancedItemFunction, @NonNull ToLongFunction<A> loadFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction), where the starting load for each balanced item is set to zero.static <A,Balanced_>
@NonNull UniConstraintCollector<A,?, LoadBalance<Balanced_>> loadBalance(@NonNull Function<A, Balanced_> balancedItemFunction, @NonNull ToLongFunction<A> loadFunction, @NonNull ToLongFunction<A> initialLoadFunction) Returns a collector that takes a stream of items and calculates the unfairness measure from them (seeLoadBalance.unfairness()).static <A extends Comparable<A>>
@NonNull UniConstraintCollector<A,?, A> max()Returns a collector that finds a maximum value in a group ofComparableelements.static <A,B, C, D, Mapped extends Comparable<? super Mapped>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Mapped> max(@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bymax(Function).static <A,B, C, D, Mapped, Comparable_ extends Comparable<? super Comparable_>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Mapped> max(@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymax(Function, Function), only with a customComparator.static <A,B, C, Mapped extends Comparable<? super Mapped>>
@NonNull TriConstraintCollector<A,B, C, ?, Mapped> max(@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bymax(Function).static <A,B, C, Mapped, Comparable_ extends Comparable<? super Comparable_>>
@NonNull TriConstraintCollector<A,B, C, ?, Mapped> max(@NonNull TriFunction<A, B, C, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymax(Function, Function), only with a customComparator.static <A,B, Mapped extends Comparable<? super Mapped>>
@NonNull BiConstraintCollector<A,B, ?, Mapped> max(@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bymax(Function).static <A,B, Mapped, Comparable_ extends Comparable<? super Comparable_>>
@NonNull BiConstraintCollector<A,B, ?, Mapped> max(@NonNull BiFunction<A, B, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymax(Function, Function), only with a customComparator.static <A,Mapped extends Comparable<? super Mapped>>
@NonNull UniConstraintCollector<A,?, Mapped> Returns a collector that finds a maximum value in a group ofComparableelements.static <A,Mapped, Comparable_ extends Comparable<? super Comparable_>>
@NonNull UniConstraintCollector<A,?, Mapped> max(@NonNull Function<A, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) Returns a collector that finds a maximum value in a group of elements.static <A,B, C, D, Mapped>
QuadConstraintCollector<A,B, C, D, ?, Mapped> max(QuadFunction<A, B, C, D, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.static <A,B, C, Mapped>
TriConstraintCollector<A,B, C, ?, Mapped> max(TriFunction<A, B, C, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(TriFunction, Function), as this method can lead to unavoidable score corruptions.static <A> UniConstraintCollector<A,?, A> max(Comparator<? super A> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(Function, Function), as this method can lead to unavoidable score corruptions.static <A,B, Mapped>
BiConstraintCollector<A,B, ?, Mapped> max(BiFunction<A, B, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(BiFunction, Function), as this method can lead to unavoidable score corruptions.static <A,Mapped> UniConstraintCollector<A, ?, Mapped> max(Function<A, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(Function, Function), as this method can lead to unavoidable score corruptions.static <A extends Comparable<A>>
@NonNull UniConstraintCollector<A,?, A> min()Returns a collector that finds a minimum value in a group ofComparableelements.static <A,B, C, D, Mapped extends Comparable<? super Mapped>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Mapped> min(@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bymin(Function).static <A,B, C, D, Mapped, Comparable_ extends Comparable<? super Comparable_>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Mapped> min(@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymin(Function, Function).static <A,B, C, Mapped extends Comparable<? super Mapped>>
@NonNull TriConstraintCollector<A,B, C, ?, Mapped> min(@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bymin(Function).static <A,B, C, Mapped, Comparable_ extends Comparable<? super Comparable_>>
@NonNull TriConstraintCollector<A,B, C, ?, Mapped> min(@NonNull TriFunction<A, B, C, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymin(Function, Function).static <A,B, Mapped extends Comparable<? super Mapped>>
@NonNull BiConstraintCollector<A,B, ?, Mapped> min(@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bymin(Function).static <A,B, Mapped, Comparable_ extends Comparable<? super Comparable_>>
@NonNull BiConstraintCollector<A,B, ?, Mapped> min(@NonNull BiFunction<A, B, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymin(Function, Function).static <A,Mapped extends Comparable<? super Mapped>>
@NonNull UniConstraintCollector<A,?, Mapped> Returns a collector that finds a minimum value in a group ofComparableelements.static <A,Mapped, Comparable_ extends Comparable<? super Comparable_>>
@NonNull UniConstraintCollector<A,?, Mapped> min(@NonNull Function<A, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) Returns a collector that finds a minimum value in a group ofComparableelements.static <A,B, C, D, Mapped>
QuadConstraintCollector<A,B, C, D, ?, Mapped> min(QuadFunction<A, B, C, D, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(QuadFunction, Function), as this method can lead to unavoidable score corruptions.static <A,B, C, Mapped>
TriConstraintCollector<A,B, C, ?, Mapped> min(TriFunction<A, B, C, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(TriFunction, Function), as this method can lead to unavoidable score corruptions.static <A> UniConstraintCollector<A,?, A> min(Comparator<? super A> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(Function, Function), as this method can lead to unavoidable score corruptions.static <A,B, Mapped>
BiConstraintCollector<A,B, ?, Mapped> min(BiFunction<A, B, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(BiFunction, Function), as this method can lead to unavoidable score corruptions.static <A,Mapped> UniConstraintCollector<A, ?, Mapped> min(Function<A, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(Function, Function), as this method can lead to unavoidable score corruptions.static <A,B, C, D, Result>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Result> sum(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, Result> groupValueMapping, @NonNull Result zero, @NonNull BinaryOperator<Result> adder, @NonNull BinaryOperator<Result> subtractor) As defined bysum(ToIntFunction).static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Integer> sum(@NonNull ToIntQuadFunction<? super A, ? super B, ? super C, ? super D> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Integer> sum(@NonNull ToIntTriFunction<? super A, ? super B, ? super C> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C, Result>
@NonNull TriConstraintCollector<A,B, C, ?, Result> sum(@NonNull TriFunction<? super A, ? super B, ? super C, Result> groupValueMapping, @NonNull Result zero, @NonNull BinaryOperator<Result> adder, @NonNull BinaryOperator<Result> subtractor) As defined bysum(ToIntFunction).static <A,B, Result>
@NonNull BiConstraintCollector<A,B, ?, Result> sum(@NonNull BiFunction<? super A, ? super B, Result> groupValueMapping, @NonNull Result zero, @NonNull BinaryOperator<Result> adder, @NonNull BinaryOperator<Result> subtractor) As defined bysum(ToIntFunction).static <A,Result> @NonNull UniConstraintCollector<A, ?, Result> sum(@NonNull Function<? super A, Result> groupValueMapping, @NonNull Result zero, @NonNull BinaryOperator<Result> adder, @NonNull BinaryOperator<Result> subtractor) As defined bysum(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Integer> sum(@NonNull ToIntBiFunction<? super A, ? super B> groupValueMapping) As defined bysum(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, Integer> sum(@NonNull ToIntFunction<? super A> groupValueMapping) Returns a collector that sums anintproperty of the elements that are being grouped.static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, BigDecimal> sumBigDecimal(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, BigDecimal> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, BigDecimal> sumBigDecimal(@NonNull TriFunction<? super A, ? super B, ? super C, BigDecimal> groupValueMapping) As defined bysum(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, BigDecimal> sumBigDecimal(@NonNull BiFunction<? super A, ? super B, BigDecimal> groupValueMapping) As defined bysum(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, BigDecimal> sumBigDecimal(@NonNull Function<? super A, BigDecimal> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, BigInteger> sumBigInteger(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, BigInteger> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, BigInteger> sumBigInteger(@NonNull TriFunction<? super A, ? super B, ? super C, BigInteger> groupValueMapping) As defined bysum(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, BigInteger> sumBigInteger(@NonNull BiFunction<? super A, ? super B, BigInteger> groupValueMapping) As defined bysum(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, BigInteger> sumBigInteger(@NonNull Function<? super A, BigInteger> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Duration> sumDuration(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, Duration> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Duration> sumDuration(@NonNull TriFunction<? super A, ? super B, ? super C, Duration> groupValueMapping) As defined bysum(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Duration> sumDuration(@NonNull BiFunction<? super A, ? super B, Duration> groupValueMapping) As defined bysum(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, Duration> sumDuration(@NonNull Function<? super A, Duration> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Long> sumLong(@NonNull ToLongQuadFunction<? super A, ? super B, ? super C, ? super D> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Long> sumLong(@NonNull ToLongTriFunction<? super A, ? super B, ? super C> groupValueMapping) As defined bysum(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Long> sumLong(@NonNull ToLongBiFunction<? super A, ? super B> groupValueMapping) As defined bysum(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, Long> sumLong(@NonNull ToLongFunction<? super A> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C, D> @NonNull QuadConstraintCollector<A, B, C, D, ?, Period> sumPeriod(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, Period> groupValueMapping) As defined bysum(ToIntFunction).static <A,B, C> @NonNull TriConstraintCollector<A, B, C, ?, Period> sumPeriod(@NonNull TriFunction<? super A, ? super B, ? super C, Period> groupValueMapping) As defined bysum(ToIntFunction).static <A,B> @NonNull BiConstraintCollector<A, B, ?, Period> sumPeriod(@NonNull BiFunction<? super A, ? super B, Period> groupValueMapping) As defined bysum(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, Period> As defined bysum(ToIntFunction).static <A,B, C, D, Mapped, Result extends Collection<Mapped>>
QuadConstraintCollector<A,B, C, D, ?, Result> toCollection(QuadFunction<A, B, C, D, Mapped> groupValueMapping, IntFunction<Result> collectionFunction) Deprecated.static <A,B, C, Mapped, Result extends Collection<Mapped>>
TriConstraintCollector<A,B, C, ?, Result> toCollection(TriFunction<A, B, C, Mapped> groupValueMapping, IntFunction<Result> collectionFunction) Deprecated.static <A,B, Mapped, Result extends Collection<Mapped>>
BiConstraintCollector<A,B, ?, Result> toCollection(BiFunction<A, B, Mapped> groupValueMapping, IntFunction<Result> collectionFunction) Deprecated.static <A,Mapped, Result extends Collection<Mapped>>
UniConstraintCollector<A,?, Result> toCollection(Function<A, Mapped> groupValueMapping, IntFunction<Result> collectionFunction) Deprecated.static <A,Result extends Collection<A>>
UniConstraintCollector<A,?, Result> toCollection(IntFunction<Result> collectionFunction) Deprecated.static <A,B, C, D, IntervalType_, PointType_ extends Comparable<PointType_>, DifferenceType_ extends Comparable<DifferenceType_>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, ConnectedRangeChain<IntervalType_, PointType_, DifferenceType_>> toConnectedRanges(@NonNull QuadFunction<A, B, C, D, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap, @NonNull BiFunction<PointType_, PointType_, DifferenceType_> differenceFunction) As defined bytoConnectedRanges(Function,Function,BiFunction).static <A,B, C, D, IntervalType_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, ConnectedRangeChain<IntervalType_, Long, Long>> toConnectedRanges(@NonNull QuadFunction<A, B, C, D, IntervalType_> intervalMap, @NonNull ToLongFunction<IntervalType_> startInclusiveMap, @NonNull ToLongFunction<IntervalType_> endExclusiveMap) As defined bytoConnectedRanges(ToLongFunction, ToLongFunction).static <A,B, C, IntervalType_, PointType_ extends Comparable<PointType_>, DifferenceType_ extends Comparable<DifferenceType_>>
@NonNull TriConstraintCollector<A,B, C, ?, ConnectedRangeChain<IntervalType_, PointType_, DifferenceType_>> toConnectedRanges(@NonNull TriFunction<A, B, C, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap, @NonNull BiFunction<PointType_, PointType_, DifferenceType_> differenceFunction) As defined bytoConnectedRanges(Function,Function,BiFunction).static <A,B, C, IntervalType_>
@NonNull TriConstraintCollector<A,B, C, ?, ConnectedRangeChain<IntervalType_, Long, Long>> toConnectedRanges(@NonNull TriFunction<A, B, C, IntervalType_> intervalMap, @NonNull ToLongFunction<IntervalType_> startInclusiveMap, @NonNull ToLongFunction<IntervalType_> endExclusiveMap) As defined bytoConnectedRanges(ToLongFunction, ToLongFunction).static <A,B, IntervalType_, PointType_ extends Comparable<PointType_>, DifferenceType_ extends Comparable<DifferenceType_>>
@NonNull BiConstraintCollector<A,B, ?, ConnectedRangeChain<IntervalType_, PointType_, DifferenceType_>> toConnectedRanges(@NonNull BiFunction<A, B, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap, @NonNull BiFunction<PointType_, PointType_, DifferenceType_> differenceFunction) As defined bytoConnectedRanges(Function,Function,BiFunction).static <A,B, IntervalType_>
@NonNull BiConstraintCollector<A,B, ?, ConnectedRangeChain<IntervalType_, Long, Long>> toConnectedRanges(@NonNull BiFunction<A, B, IntervalType_> intervalMap, @NonNull ToLongFunction<IntervalType_> startInclusiveMap, @NonNull ToLongFunction<IntervalType_> endExclusiveMap) As defined bytoConnectedRanges(ToLongFunction, ToLongFunction).static <A,PointType_ extends Comparable<PointType_>, DifferenceType_ extends Comparable<DifferenceType_>>
@NonNull UniConstraintCollector<A,?, ConnectedRangeChain<A, PointType_, DifferenceType_>> toConnectedRanges(@NonNull Function<A, PointType_> startInclusiveMap, @NonNull Function<A, PointType_> endExclusiveMap, @NonNull BiFunction<PointType_, PointType_, DifferenceType_> differenceFunction) Creates a constraint collector that returnsConnectedRangeChainabout the first fact.static <A> @NonNull UniConstraintCollector<A,?, ConnectedRangeChain<A, Long, Long>> toConnectedRanges(@NonNull ToLongFunction<A> startInclusiveMap, @NonNull ToLongFunction<A> endExclusiveMap) Specialized version oftoConnectedRanges(Function,Function,BiFunction)for Long.static <A,B, C, D, IntervalType_, PointType_ extends Temporal & Comparable<PointType_>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, ConnectedRangeChain<IntervalType_, PointType_, Duration>> toConnectedTemporalRanges(@NonNull QuadFunction<A, B, C, D, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap) As defined bytoConnectedTemporalRanges(Function,Function).static <A,B, C, IntervalType_, PointType_ extends Temporal & Comparable<PointType_>>
@NonNull TriConstraintCollector<A,B, C, ?, ConnectedRangeChain<IntervalType_, PointType_, Duration>> toConnectedTemporalRanges(@NonNull TriFunction<A, B, C, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap) As defined bytoConnectedTemporalRanges(Function,Function).static <A,B, IntervalType_, PointType_ extends Temporal & Comparable<PointType_>>
@NonNull BiConstraintCollector<A,B, ?, ConnectedRangeChain<IntervalType_, PointType_, Duration>> toConnectedTemporalRanges(@NonNull BiFunction<A, B, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap) As defined bytoConnectedTemporalRanges(Function,Function).static <A,PointType_ extends Temporal & Comparable<PointType_>>
@NonNull UniConstraintCollector<A,?, ConnectedRangeChain<A, PointType_, Duration>> toConnectedTemporalRanges(@NonNull Function<A, PointType_> startInclusiveMap, @NonNull Function<A, PointType_> endExclusiveMap) Specialized version oftoConnectedRanges(Function,Function,BiFunction)forTemporaltypes.static <A,B, C, D, Result_>
@NonNull QuadConstraintCollector<A,B, C, D, ?, SequenceChain<Result_, Integer>> toConsecutiveSequences(@NonNull QuadFunction<A, B, C, D, Result_> resultMap, @NonNull ToIntFunction<Result_> indexMap) As defined bytoConsecutiveSequences(ToIntFunction).static <A,B, C, Result_>
@NonNull TriConstraintCollector<A,B, C, ?, SequenceChain<Result_, Integer>> toConsecutiveSequences(@NonNull TriFunction<A, B, C, Result_> resultMap, @NonNull ToIntFunction<Result_> indexMap) As defined bytoConsecutiveSequences(ToIntFunction).static <A,B, Result_>
@NonNull BiConstraintCollector<A,B, ?, SequenceChain<Result_, Integer>> toConsecutiveSequences(@NonNull BiFunction<A, B, Result_> resultMap, @NonNull ToIntFunction<Result_> indexMap) As defined bytoConsecutiveSequences(ToIntFunction).static <A> @NonNull UniConstraintCollector<A,?, SequenceChain<A, Integer>> toConsecutiveSequences(@NonNull ToIntFunction<A> indexMap) Creates a constraint collector that returnsSequenceChainabout the first fact.static <A> @NonNull UniConstraintCollector<A,?, List<A>> toList()Creates constraint collector that returnsListof the same element type as theConstraintStream.static <A,B, C, D, Mapped>
@NonNull QuadConstraintCollector<A,B, C, D, ?, List<Mapped>> toList(@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bytoList(Function).static <A,B, C, Mapped>
@NonNull TriConstraintCollector<A,B, C, ?, List<Mapped>> toList(@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bytoList(Function).static <A,B, Mapped>
@NonNull BiConstraintCollector<A,B, ?, List<Mapped>> toList(@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bytoList(Function).static <A,Mapped> @NonNull UniConstraintCollector<A, ?, List<Mapped>> Creates constraint collector that returnsListof the given element type.static <A,B, C, D, Key, Value>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Map<Key, Set<Value>>> toMap(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper) As defined bytoMap(Function, Function).static <A,B, C, D, Key, Value>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Map<Key, Value>> toMap(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoMap(Function, Function, BinaryOperator).static <A,B, C, D, Key, Value, ValueSet extends Set<Value>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Map<Key, ValueSet>> toMap(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoMap(Function, Function, IntFunction).static <A,B, C, Key, Value>
@NonNull TriConstraintCollector<A,B, C, ?, Map<Key, Set<Value>>> toMap(@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper) As defined bytoMap(Function, Function).static <A,B, C, Key, Value>
@NonNull TriConstraintCollector<A,B, C, ?, Map<Key, Value>> toMap(@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoMap(Function, Function, BinaryOperator).static <A,B, C, Key, Value, ValueSet extends Set<Value>>
@NonNull TriConstraintCollector<A,B, C, ?, Map<Key, ValueSet>> toMap(@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoMap(Function, Function, IntFunction).static <A,B, Key, Value>
@NonNull BiConstraintCollector<A,B, ?, Map<Key, Set<Value>>> toMap(@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper) As defined bytoMap(Function, Function).static <A,B, Key, Value>
@NonNull BiConstraintCollector<A,B, ?, Map<Key, Value>> toMap(@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoMap(Function, Function, BinaryOperator).static <A,B, Key, Value, ValueSet extends Set<Value>>
@NonNull BiConstraintCollector<A,B, ?, Map<Key, ValueSet>> toMap(@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoMap(Function, Function, IntFunction).static <A,Key, Value>
@NonNull UniConstraintCollector<A,?, Map<Key, Set<Value>>> toMap(@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper) static <A,Key, Value>
@NonNull UniConstraintCollector<A,?, Map<Key, Value>> toMap(@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) Creates a constraint collector that returns aMap.static <A,Key, Value, ValueSet extends Set<Value>>
@NonNull UniConstraintCollector<A,?, Map<Key, ValueSet>> toMap(@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) static <A> @NonNull UniConstraintCollector<A,?, Set<A>> toSet()Creates constraint collector that returnsSetof the same element type as theConstraintStream.static <A,B, C, D, Mapped>
@NonNull QuadConstraintCollector<A,B, C, D, ?, Set<Mapped>> toSet(@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bytoSet(Function).static <A,B, C, Mapped>
@NonNull TriConstraintCollector<A,B, C, ?, Set<Mapped>> toSet(@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bytoSet(Function).static <A,B, Mapped>
@NonNull BiConstraintCollector<A,B, ?, Set<Mapped>> toSet(@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bytoSet(Function).static <A,Mapped> @NonNull UniConstraintCollector<A, ?, Set<Mapped>> Creates constraint collector that returnsSetof the same element type as theConstraintStream.static <A,B, C, D, Key extends Comparable<? super Key>, Value>
@NonNull QuadConstraintCollector<A,B, C, D, ?, SortedMap<Key, Set<Value>>> toSortedMap(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper) As defined bytoSortedMap(Function, Function).static <A,B, C, D, Key extends Comparable<? super Key>, Value>
@NonNull QuadConstraintCollector<A,B, C, D, ?, SortedMap<Key, Value>> toSortedMap(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoSortedMap(Function, Function, BinaryOperator).static <A,B, C, D, Key extends Comparable<? super Key>, Value, ValueSet extends Set<Value>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, SortedMap<Key, ValueSet>> toSortedMap(@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoSortedMap(Function, Function, IntFunction).static <A,B, C, Key extends Comparable<? super Key>, Value>
@NonNull TriConstraintCollector<A,B, C, ?, SortedMap<Key, Set<Value>>> toSortedMap(@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper) As defined bytoSortedMap(Function, Function).static <A,B, C, Key extends Comparable<? super Key>, Value>
@NonNull TriConstraintCollector<A,B, C, ?, SortedMap<Key, Value>> toSortedMap(@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoSortedMap(Function, Function, BinaryOperator).static <A,B, C, Key extends Comparable<? super Key>, Value, ValueSet extends Set<Value>>
@NonNull TriConstraintCollector<A,B, C, ?, SortedMap<Key, ValueSet>> toSortedMap(@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoSortedMap(Function, Function, IntFunction).static <A,B, Key extends Comparable<? super Key>, Value>
@NonNull BiConstraintCollector<A,B, ?, SortedMap<Key, Set<Value>>> toSortedMap(@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper) As defined bytoSortedMap(Function, Function).static <A,B, Key extends Comparable<? super Key>, Value>
@NonNull BiConstraintCollector<A,B, ?, SortedMap<Key, Value>> toSortedMap(@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoSortedMap(Function, Function, BinaryOperator).static <A,B, Key extends Comparable<? super Key>, Value, ValueSet extends Set<Value>>
@NonNull BiConstraintCollector<A,B, ?, SortedMap<Key, ValueSet>> toSortedMap(@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoSortedMap(Function, Function, IntFunction).static <A,Key extends Comparable<? super Key>, Value>
@NonNull UniConstraintCollector<A,?, SortedMap<Key, Set<Value>>> toSortedMap(@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper) static <A,Key extends Comparable<? super Key>, Value>
@NonNull UniConstraintCollector<A,?, SortedMap<Key, Value>> toSortedMap(@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) Creates a constraint collector that returns aSortedMap.static <A,Key extends Comparable<? super Key>, Value, ValueSet extends Set<Value>>
@NonNull UniConstraintCollector<A,?, SortedMap<Key, ValueSet>> toSortedMap(@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) static <A extends Comparable<A>>
@NonNull UniConstraintCollector<A,?, SortedSet<A>> Creates constraint collector that returnsSortedSetof the same element type as theConstraintStream.static <A,B, C, D, Mapped extends Comparable<? super Mapped>>
@NonNull QuadConstraintCollector<A,B, C, D, ?, SortedSet<Mapped>> toSortedSet(@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bytoSortedSet(Function).static <A,B, C, D, Mapped>
@NonNull QuadConstraintCollector<A,B, C, D, ?, SortedSet<Mapped>> toSortedSet(@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping, @NonNull Comparator<? super Mapped> comparator) As defined bytoSortedSet(Function, Comparator).static <A,B, C, Mapped extends Comparable<? super Mapped>>
@NonNull TriConstraintCollector<A,B, C, ?, SortedSet<Mapped>> toSortedSet(@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bytoSortedSet(Function).static <A,B, C, Mapped>
@NonNull TriConstraintCollector<A,B, C, ?, SortedSet<Mapped>> toSortedSet(@NonNull TriFunction<A, B, C, Mapped> groupValueMapping, @NonNull Comparator<? super Mapped> comparator) As defined bytoSortedSet(Function, Comparator).static <A> @NonNull UniConstraintCollector<A,?, SortedSet<A>> toSortedSet(@NonNull Comparator<? super A> comparator) As defined bytoSortedSet(), only with a customComparator.static <A,B, Mapped extends Comparable<? super Mapped>>
@NonNull BiConstraintCollector<A,B, ?, SortedSet<Mapped>> toSortedSet(@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bytoSortedSet(Function).static <A,B, Mapped>
@NonNull BiConstraintCollector<A,B, ?, SortedSet<Mapped>> toSortedSet(@NonNull BiFunction<A, B, Mapped> groupValueMapping, @NonNull Comparator<? super Mapped> comparator) As defined bytoSortedSet(Function, Comparator).static <A,Mapped extends Comparable<? super Mapped>>
@NonNull UniConstraintCollector<A,?, SortedSet<Mapped>> toSortedSet(@NonNull Function<A, Mapped> groupValueMapping) Creates constraint collector that returnsSortedSetof the same element type as theConstraintStream.static <A,Mapped> @NonNull UniConstraintCollector<A, ?, SortedSet<Mapped>> toSortedSet(@NonNull Function<A, Mapped> groupValueMapping, @NonNull Comparator<? super Mapped> comparator) As defined bytoSortedSet(Function), only with a customComparator.
-
Method Details
-
count
Returns a collector that counts the number of elements that are being grouped.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(count())returns5.The default result of the collector (e.g. when never called) is
0.- Type Parameters:
A- type of the matched fact
-
countLong
As defined bycount(). -
countBi
As defined bycount(). -
countLongBi
As defined bycount(). -
countTri
As defined bycount(). -
countLongTri
As defined bycount(). -
countQuad
As defined bycount(). -
countLongQuad
As defined bycount(). -
countDistinct
As defined bycountDistinct(Function), withFunction.identity()as the argument. -
countDistinct
public static <A> @NonNull UniConstraintCollector<A,?, countDistinctInteger> (@NonNull Function<A, ?> groupValueMapping) Returns a collector that counts the number of unique elements that are being grouped. Uniqueness is determined byequality.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(countDistinct(Person::getAge))returns3, one for age 20, 25 and 30 each.The default result of the collector (e.g. when never called) is
0.- Type Parameters:
A- type of the matched fact
-
countDistinctLong
public static <A> @NonNull UniConstraintCollector<A,?, countDistinctLongLong> (@NonNull Function<A, ?> groupValueMapping) As defined bycountDistinct(Function). -
countDistinct
public static <A,B> @NonNull BiConstraintCollector<A,B, countDistinct?, Integer> (@NonNull BiFunction<A, B, ?> groupValueMapping) As defined bycountDistinct(Function). -
countDistinctLong
public static <A,B> @NonNull BiConstraintCollector<A,B, countDistinctLong?, Long> (@NonNull BiFunction<A, B, ?> groupValueMapping) As defined bycountDistinct(Function). -
countDistinct
public static <A,B, @NonNull TriConstraintCollector<A,C> B, countDistinctC, ?, Integer> (@NonNull TriFunction<A, B, C, ?> groupValueMapping) As defined bycountDistinct(Function). -
countDistinctLong
public static <A,B, @NonNull TriConstraintCollector<A,C> B, countDistinctLongC, ?, Long> (@NonNull TriFunction<A, B, C, ?> groupValueMapping) As defined bycountDistinct(Function). -
countDistinct
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, countDistinctC, D, ?, Integer> (@NonNull QuadFunction<A, B, C, D, ?> groupValueMapping) As defined bycountDistinct(Function). -
countDistinctLong
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, countDistinctLongC, D, ?, Long> (@NonNull QuadFunction<A, B, C, D, ?> groupValueMapping) As defined bycountDistinct(Function). -
sum
public static <A> @NonNull UniConstraintCollector<A,?, sumInteger> (@NonNull ToIntFunction<? super A> groupValueMapping) Returns a collector that sums anintproperty of the elements that are being grouped.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(sum(Person::getAge))returns125.The default result of the collector (e.g. when never called) is
0.- Type Parameters:
A- type of the matched fact
-
sumLong
public static <A> @NonNull UniConstraintCollector<A,?, sumLongLong> (@NonNull ToLongFunction<? super A> groupValueMapping) As defined bysum(ToIntFunction). -
sum
public static <A,Result> @NonNull UniConstraintCollector<A,?, sumResult> (@NonNull Function<? super A, Result> groupValueMapping, @NonNull Result zero, @NonNull BinaryOperator<Result> adder, @NonNull BinaryOperator<Result> subtractor) As defined bysum(ToIntFunction). -
sumBigDecimal
public static <A> @NonNull UniConstraintCollector<A,?, sumBigDecimalBigDecimal> (@NonNull Function<? super A, BigDecimal> groupValueMapping) As defined bysum(ToIntFunction). -
sumBigInteger
public static <A> @NonNull UniConstraintCollector<A,?, sumBigIntegerBigInteger> (@NonNull Function<? super A, BigInteger> groupValueMapping) As defined bysum(ToIntFunction). -
sumDuration
public static <A> @NonNull UniConstraintCollector<A,?, sumDurationDuration> (@NonNull Function<? super A, Duration> groupValueMapping) As defined bysum(ToIntFunction). -
sumPeriod
public static <A> @NonNull UniConstraintCollector<A,?, sumPeriodPeriod> (@NonNull Function<? super A, Period> groupValueMapping) As defined bysum(ToIntFunction). -
sum
public static <A,B> @NonNull BiConstraintCollector<A,B, sum?, Integer> (@NonNull ToIntBiFunction<? super A, ? super B> groupValueMapping) As defined bysum(ToIntFunction). -
sumLong
public static <A,B> @NonNull BiConstraintCollector<A,B, sumLong?, Long> (@NonNull ToLongBiFunction<? super A, ? super B> groupValueMapping) As defined bysum(ToIntFunction). -
sum
public static <A,B, @NonNull BiConstraintCollector<A,Result> B, sum?, Result> (@NonNull BiFunction<? super A, ? super B, Result> groupValueMapping, @NonNull Result zero, @NonNull BinaryOperator<Result> adder, @NonNull BinaryOperator<Result> subtractor) As defined bysum(ToIntFunction). -
sumBigDecimal
public static <A,B> @NonNull BiConstraintCollector<A,B, sumBigDecimal?, BigDecimal> (@NonNull BiFunction<? super A, ? super B, BigDecimal> groupValueMapping) As defined bysum(ToIntFunction). -
sumBigInteger
public static <A,B> @NonNull BiConstraintCollector<A,B, sumBigInteger?, BigInteger> (@NonNull BiFunction<? super A, ? super B, BigInteger> groupValueMapping) As defined bysum(ToIntFunction). -
sumDuration
public static <A,B> @NonNull BiConstraintCollector<A,B, sumDuration?, Duration> (@NonNull BiFunction<? super A, ? super B, Duration> groupValueMapping) As defined bysum(ToIntFunction). -
sumPeriod
public static <A,B> @NonNull BiConstraintCollector<A,B, sumPeriod?, Period> (@NonNull BiFunction<? super A, ? super B, Period> groupValueMapping) As defined bysum(ToIntFunction). -
sum
public static <A,B, @NonNull TriConstraintCollector<A,C> B, sumC, ?, Integer> (@NonNull ToIntTriFunction<? super A, ? super B, ? super C> groupValueMapping) As defined bysum(ToIntFunction). -
sumLong
public static <A,B, @NonNull TriConstraintCollector<A,C> B, sumLongC, ?, Long> (@NonNull ToLongTriFunction<? super A, ? super B, ? super C> groupValueMapping) As defined bysum(ToIntFunction). -
sum
public static <A,B, @NonNull TriConstraintCollector<A,C, Result> B, sumC, ?, Result> (@NonNull TriFunction<? super A, ? super B, ? super C, Result> groupValueMapping, @NonNull Result zero, @NonNull BinaryOperator<Result> adder, @NonNull BinaryOperator<Result> subtractor) As defined bysum(ToIntFunction). -
sumBigDecimal
public static <A,B, @NonNull TriConstraintCollector<A,C> B, sumBigDecimalC, ?, BigDecimal> (@NonNull TriFunction<? super A, ? super B, ? super C, BigDecimal> groupValueMapping) As defined bysum(ToIntFunction). -
sumBigInteger
public static <A,B, @NonNull TriConstraintCollector<A,C> B, sumBigIntegerC, ?, BigInteger> (@NonNull TriFunction<? super A, ? super B, ? super C, BigInteger> groupValueMapping) As defined bysum(ToIntFunction). -
sumDuration
public static <A,B, @NonNull TriConstraintCollector<A,C> B, sumDurationC, ?, Duration> (@NonNull TriFunction<? super A, ? super B, ? super C, Duration> groupValueMapping) As defined bysum(ToIntFunction). -
sumPeriod
public static <A,B, @NonNull TriConstraintCollector<A,C> B, sumPeriodC, ?, Period> (@NonNull TriFunction<? super A, ? super B, ? super C, Period> groupValueMapping) As defined bysum(ToIntFunction). -
sum
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, sumC, D, ?, Integer> (@NonNull ToIntQuadFunction<? super A, ? super B, ? super C, ? super D> groupValueMapping) As defined bysum(ToIntFunction). -
sumLong
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, sumLongC, D, ?, Long> (@NonNull ToLongQuadFunction<? super A, ? super B, ? super C, ? super D> groupValueMapping) As defined bysum(ToIntFunction). -
sum
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Result> B, sumC, D, ?, Result> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, Result> groupValueMapping, @NonNull Result zero, @NonNull BinaryOperator<Result> adder, @NonNull BinaryOperator<Result> subtractor) As defined bysum(ToIntFunction). -
sumBigDecimal
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, sumBigDecimalC, D, ?, BigDecimal> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, BigDecimal> groupValueMapping) As defined bysum(ToIntFunction). -
sumBigInteger
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, sumBigIntegerC, D, ?, BigInteger> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, BigInteger> groupValueMapping) As defined bysum(ToIntFunction). -
sumDuration
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, sumDurationC, D, ?, Duration> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, Duration> groupValueMapping) As defined bysum(ToIntFunction). -
sumPeriod
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, sumPeriodC, D, ?, Period> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, Period> groupValueMapping) As defined bysum(ToIntFunction). -
min
Returns a collector that finds a minimum value in a group ofComparableelements.Important: The
Comparable'sComparable.compareTo(Object)must be consistent with equals, such thate1.compareTo(e2) == 0has the same boolean value ase1.equals(e2). In other words, if two elements compare to zero, any of them can be returned by the collector. It can even differ between 2 score calculations on the exact samePlanningSolutionstate, due to incremental score calculation.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(min())returns eitherAnnorEricarbitrarily, assuming the objects areComparableby theagefield. To avoid this, always end yourComparatorby an identity comparison, such asComparator.comparing(Person::getAge).comparing(Person::getId)).The default result of the collector (e.g. when never called) is
null.- Type Parameters:
A- type of the matched fact
-
min
public static <A,Mapped extends Comparable<? super Mapped>> @NonNull UniConstraintCollector<A,?, minMapped> (@NonNull Function<A, Mapped> groupValueMapping) Returns a collector that finds a minimum value in a group ofComparableelements.Important: The
Comparable'sComparable.compareTo(Object)must be consistent with equals, such thate1.compareTo(e2) == 0has the same boolean value ase1.equals(e2). In other words, if two elements compare to zero, any of them can be returned by the collector. It can even differ between 2 score calculations on the exact samePlanningSolutionstate, due to incremental score calculation.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(min(Person::getAge))returns20.The default result of the collector (e.g. when never called) is
null.- Type Parameters:
A- type of the matched factMapped- type of the result- Parameters:
groupValueMapping- maps facts from the matched type to the result type
-
min
public static <A,Mapped, @NonNull UniConstraintCollector<A,Comparable_ extends Comparable<? super Comparable_>> ?, minMapped> (@NonNull Function<A, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) Returns a collector that finds a minimum value in a group ofComparableelements. The elements will be compared according to the value returned by the comparable function.Important: The
Comparable'sComparable.compareTo(Object)must be consistent with equals, such thate1.compareTo(e2) == 0has the same boolean value ase1.equals(e2). In other words, if two elements compare to zero, any of them can be returned by the collector. It can even differ between 2 score calculations on the exact samePlanningSolutionstate, due to incremental score calculation.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(min(Person::name, Person::age))returnsAnnorEric, as both have the same age.The default result of the collector (e.g. when never called) is
null.- Type Parameters:
A- type of the matched factMapped- type of the resultComparable_- type of the comparable property- Parameters:
groupValueMapping- maps facts from the matched type to the result typecomparableFunction- maps facts from the matched type to the comparable property
-
min
@Deprecated(forRemoval=true, since="1.0.0") public static <A> UniConstraintCollector<A,?, minA> (Comparator<? super A> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(Function, Function), as this method can lead to unavoidable score corruptions.As defined bymin(), only with a customComparator. -
min
@Deprecated(forRemoval=true, since="1.0.0") public static <A,Mapped> UniConstraintCollector<A,?, minMapped> (Function<A, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(Function, Function), as this method can lead to unavoidable score corruptions.As defined bymin(Function), only with a customComparator. -
min
public static <A,B, @NonNull BiConstraintCollector<A,Mapped extends Comparable<? super Mapped>> B, min?, Mapped> (@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bymin(Function). -
min
public static <A,B, @NonNull BiConstraintCollector<A,Mapped, Comparable_ extends Comparable<? super Comparable_>> B, min?, Mapped> (@NonNull BiFunction<A, B, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymin(Function, Function). -
min
@Deprecated(forRemoval=true, since="1.0.0") public static <A,B, BiConstraintCollector<A,Mapped> B, min?, Mapped> (BiFunction<A, B, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(BiFunction, Function), as this method can lead to unavoidable score corruptions.As defined bymin(Function), only with a customComparator. -
min
public static <A,B, @NonNull TriConstraintCollector<A,C, Mapped extends Comparable<? super Mapped>> B, minC, ?, Mapped> (@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bymin(Function). -
min
public static <A,B, @NonNull TriConstraintCollector<A,C, Mapped, Comparable_ extends Comparable<? super Comparable_>> B, minC, ?, Mapped> (@NonNull TriFunction<A, B, C, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymin(Function, Function). -
min
@Deprecated(forRemoval=true, since="1.0.0") public static <A,B, TriConstraintCollector<A,C, Mapped> B, minC, ?, Mapped> (TriFunction<A, B, C, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(TriFunction, Function), as this method can lead to unavoidable score corruptions.As defined bymin(Function), only with a customComparator. -
min
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Mapped extends Comparable<? super Mapped>> B, minC, D, ?, Mapped> (@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bymin(Function). -
min
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Mapped, Comparable_ extends Comparable<? super Comparable_>> B, minC, D, ?, Mapped> (@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymin(Function, Function). -
min
@Deprecated(forRemoval=true, since="1.0.0") public static <A,B, QuadConstraintCollector<A,C, D, Mapped> B, minC, D, ?, Mapped> (QuadFunction<A, B, C, D, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmin(QuadFunction, Function), as this method can lead to unavoidable score corruptions.As defined bymin(Function), only with a customComparator. -
max
Returns a collector that finds a maximum value in a group ofComparableelements.Important: The
Comparable'sComparable.compareTo(Object)must be consistent with equals, such thate1.compareTo(e2) == 0has the same boolean value ase1.equals(e2). In other words, if two elements compare to zero, any of them can be returned by the collector. It can even differ between 2 score calculations on the exact samePlanningSolutionstate, due to incremental score calculation.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(max())returns eitherCathyorDavidarbitrarily, assuming the objects areComparableby theagefield. To avoid this, always end yourComparatorby an identity comparison, such asComparator.comparing(Person::getAge).comparing(Person::getId)).The default result of the collector (e.g. when never called) is
null.- Type Parameters:
A- type of the matched fact
-
max
public static <A,Mapped extends Comparable<? super Mapped>> @NonNull UniConstraintCollector<A,?, maxMapped> (@NonNull Function<A, Mapped> groupValueMapping) Returns a collector that finds a maximum value in a group ofComparableelements.Important: The
Comparable'sComparable.compareTo(Object)must be consistent with equals, such thate1.compareTo(e2) == 0has the same boolean value ase1.equals(e2). In other words, if two elements compare to zero, any of them can be returned by the collector. It can even differ between 2 score calculations on the exact samePlanningSolutionstate, due to incremental score calculation.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(max(Person::getAge))returns30.The default result of the collector (e.g. when never called) is
null.- Type Parameters:
A- type of the matched factMapped- type of the result- Parameters:
groupValueMapping- maps facts from the matched type to the result type
-
max
@Deprecated(forRemoval=true, since="1.0.0") public static <A> UniConstraintCollector<A,?, maxA> (Comparator<? super A> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(Function, Function), as this method can lead to unavoidable score corruptions.As defined bymax(), only with a customComparator. -
max
public static <A,Mapped, @NonNull UniConstraintCollector<A,Comparable_ extends Comparable<? super Comparable_>> ?, maxMapped> (@NonNull Function<A, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) Returns a collector that finds a maximum value in a group of elements. The elements will be compared according to the value returned by the comparable function.Important: The
Comparable'sComparable.compareTo(Object)must be consistent with equals, such thate1.compareTo(e2) == 0has the same boolean value ase1.equals(e2). In other words, if two elements compare to zero, any of them can be returned by the collector. It can even differ between 2 score calculations on the exact samePlanningSolutionstate, due to incremental score calculation.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(max(Person::name, Person::age))returnsCathyorDavid, as both have the same age.The default result of the collector (e.g. when never called) is
null.- Type Parameters:
A- type of the matched factMapped- type of the resultComparable_- type of the comparable property- Parameters:
groupValueMapping- maps facts from the matched type to the result type
-
max
@Deprecated(forRemoval=true, since="1.0.0") public static <A,Mapped> UniConstraintCollector<A,?, maxMapped> (Function<A, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(Function, Function), as this method can lead to unavoidable score corruptions.As defined bymax(Function), only with a customComparator. -
max
public static <A,B, @NonNull BiConstraintCollector<A,Mapped extends Comparable<? super Mapped>> B, max?, Mapped> (@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bymax(Function). -
max
public static <A,B, @NonNull BiConstraintCollector<A,Mapped, Comparable_ extends Comparable<? super Comparable_>> B, max?, Mapped> (@NonNull BiFunction<A, B, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymax(Function, Function), only with a customComparator. -
max
@Deprecated(forRemoval=true, since="1.0.0") public static <A,B, BiConstraintCollector<A,Mapped> B, max?, Mapped> (BiFunction<A, B, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(BiFunction, Function), as this method can lead to unavoidable score corruptions.As defined bymax(), only with a customComparator. -
max
public static <A,B, @NonNull TriConstraintCollector<A,C, Mapped extends Comparable<? super Mapped>> B, maxC, ?, Mapped> (@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bymax(Function). -
max
public static <A,B, @NonNull TriConstraintCollector<A,C, Mapped, Comparable_ extends Comparable<? super Comparable_>> B, maxC, ?, Mapped> (@NonNull TriFunction<A, B, C, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymax(Function, Function), only with a customComparator. -
max
@Deprecated(forRemoval=true, since="1.0.0") public static <A,B, TriConstraintCollector<A,C, Mapped> B, maxC, ?, Mapped> (TriFunction<A, B, C, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(TriFunction, Function), as this method can lead to unavoidable score corruptions.As defined bymax(), only with a customComparator. -
max
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Mapped extends Comparable<? super Mapped>> B, maxC, D, ?, Mapped> (@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bymax(Function). -
max
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Mapped, Comparable_ extends Comparable<? super Comparable_>> B, maxC, D, ?, Mapped> (@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping, @NonNull Function<Mapped, Comparable_> comparableFunction) As defined bymax(Function, Function), only with a customComparator. -
max
@Deprecated(forRemoval=true, since="1.0.0") public static <A,B, QuadConstraintCollector<A,C, D, Mapped> B, maxC, D, ?, Mapped> (QuadFunction<A, B, C, D, Mapped> groupValueMapping, Comparator<? super Mapped> comparator) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofmax(QuadFunction, Function), as this method can lead to unavoidable score corruptions.As defined bymax(), only with a customComparator. -
toCollection
@Deprecated public static <A,Result extends Collection<A>> UniConstraintCollector<A,?, toCollectionResult> (IntFunction<Result> collectionFunction) Deprecated. -
average
public static <A> @NonNull UniConstraintCollector<A,?, averageDouble> (@NonNull ToIntFunction<A> groupValueMapping) Returns a collector that calculates an average of anintproperty of the elements that are being grouped.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(average(Person::getAge))returns25.The default result of the collector (e.g. when never called) is
null.- Type Parameters:
A- type of the matched fact
-
averageLong
public static <A> @NonNull UniConstraintCollector<A,?, averageLongDouble> (@NonNull ToLongFunction<A> groupValueMapping) As defined byaverage(ToIntFunction). -
averageBigDecimal
public static <A> @NonNull UniConstraintCollector<A,?, averageBigDecimalBigDecimal> (@NonNull Function<A, BigDecimal> groupValueMapping) As defined byaverage(ToIntFunction). The scale of the resultingBigDecimalwill be equal to the scale of the sum of all the input tuples, with rounding modeRoundingMode.HALF_EVEN. -
averageBigInteger
public static <A> @NonNull UniConstraintCollector<A,?, averageBigIntegerBigDecimal> (@NonNull Function<A, BigInteger> groupValueMapping) As defined byaverage(ToIntFunction). The scale of the resultingBigDecimalwill be equal to the scale of the sum of all the input tuples, with rounding modeRoundingMode.HALF_EVEN. -
averageDuration
public static <A> @NonNull UniConstraintCollector<A,?, averageDurationDuration> (@NonNull Function<A, Duration> groupValueMapping) As defined byaverage(ToIntFunction). -
average
public static <A,B> @NonNull BiConstraintCollector<A,B, average?, Double> (@NonNull ToIntBiFunction<A, B> groupValueMapping) As defined byaverage(ToIntFunction). -
averageLong
public static <A,B> @NonNull BiConstraintCollector<A,B, averageLong?, Double> (@NonNull ToLongBiFunction<A, B> groupValueMapping) As defined byaverage(ToIntFunction). -
averageBigDecimal
public static <A,B> @NonNull BiConstraintCollector<A,B, averageBigDecimal?, BigDecimal> (@NonNull BiFunction<A, B, BigDecimal> groupValueMapping) As defined byaverageBigDecimal(Function). -
averageBigInteger
public static <A,B> @NonNull BiConstraintCollector<A,B, averageBigInteger?, BigDecimal> (@NonNull BiFunction<A, B, BigInteger> groupValueMapping) As defined byaverageBigInteger(Function). -
averageDuration
public static <A,B> @NonNull BiConstraintCollector<A,B, averageDuration?, Duration> (@NonNull BiFunction<A, B, Duration> groupValueMapping) As defined byaverage(ToIntFunction). -
average
public static <A,B, @NonNull TriConstraintCollector<A,C> B, averageC, ?, Double> (@NonNull ToIntTriFunction<A, B, C> groupValueMapping) As defined byaverage(ToIntFunction). -
averageLong
public static <A,B, @NonNull TriConstraintCollector<A,C> B, averageLongC, ?, Double> (@NonNull ToLongTriFunction<A, B, C> groupValueMapping) As defined byaverage(ToIntFunction). -
averageBigDecimal
public static <A,B, @NonNull TriConstraintCollector<A,C> B, averageBigDecimalC, ?, BigDecimal> (@NonNull TriFunction<A, B, C, BigDecimal> groupValueMapping) As defined byaverageBigDecimal(Function). -
averageBigInteger
public static <A,B, @NonNull TriConstraintCollector<A,C> B, averageBigIntegerC, ?, BigDecimal> (@NonNull TriFunction<A, B, C, BigInteger> groupValueMapping) As defined byaverageBigInteger(Function). -
averageDuration
public static <A,B, @NonNull TriConstraintCollector<A,C> B, averageDurationC, ?, Duration> (@NonNull TriFunction<A, B, C, Duration> groupValueMapping) As defined byaverage(ToIntFunction). -
average
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, averageC, D, ?, Double> (@NonNull ToIntQuadFunction<A, B, C, D> groupValueMapping) As defined byaverage(ToIntFunction). -
averageLong
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, averageLongC, D, ?, Double> (@NonNull ToLongQuadFunction<A, B, C, D> groupValueMapping) As defined byaverage(ToIntFunction). -
averageBigDecimal
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, averageBigDecimalC, D, ?, BigDecimal> (@NonNull QuadFunction<A, B, C, D, BigDecimal> groupValueMapping) As defined byaverageBigDecimal(Function). -
averageBigInteger
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, averageBigIntegerC, D, ?, BigDecimal> (@NonNull QuadFunction<A, B, C, D, BigInteger> groupValueMapping) As defined byaverageBigInteger(Function). -
averageDuration
public static <A,B, @NonNull QuadConstraintCollector<A,C, D> B, averageDurationC, D, ?, Duration> (@NonNull QuadFunction<A, B, C, D, Duration> groupValueMapping) As defined byaverage(ToIntFunction). -
toSet
Creates constraint collector that returnsSetof the same element type as theConstraintStream. Makes no guarantees on iteration order. For stable iteration order, usetoSortedSet().The default result of the collector (e.g. when never called) is an empty
Set.- Type Parameters:
A- type of the matched fact
-
toSortedSet
public static <A extends Comparable<A>> @NonNull UniConstraintCollector<A,?, toSortedSet()SortedSet<A>> Creates constraint collector that returnsSortedSetof the same element type as theConstraintStream.The default result of the collector (e.g. when never called) is an empty
SortedSet.- Type Parameters:
A- type of the matched fact
-
toSortedSet
public static <A> @NonNull UniConstraintCollector<A,?, toSortedSetSortedSet<A>> (@NonNull Comparator<? super A> comparator) As defined bytoSortedSet(), only with a customComparator. -
toList
Creates constraint collector that returnsListof the same element type as theConstraintStream. Makes no guarantees on iteration order. For stable iteration order, usetoSortedSet().The default result of the collector (e.g. when never called) is an empty
List.- Type Parameters:
A- type of the matched fact
-
toCollection
@Deprecated public static <A,Mapped, UniConstraintCollector<A,Result extends Collection<Mapped>> ?, toCollectionResult> (Function<A, Mapped> groupValueMapping, IntFunction<Result> collectionFunction) Deprecated. -
toSet
public static <A,Mapped> @NonNull UniConstraintCollector<A,?, toSetSet<Mapped>> (@NonNull Function<A, Mapped> groupValueMapping) Creates constraint collector that returnsSetof the same element type as theConstraintStream. Makes no guarantees on iteration order. For stable iteration order, usetoSortedSet().The default result of the collector (e.g. when never called) is an empty
Set.- Type Parameters:
A- type of the matched factMapped- type of elements in the resulting set- Parameters:
groupValueMapping- converts matched facts to elements of the resulting set
-
toSortedSet
public static <A,Mapped extends Comparable<? super Mapped>> @NonNull UniConstraintCollector<A,?, toSortedSetSortedSet<Mapped>> (@NonNull Function<A, Mapped> groupValueMapping) Creates constraint collector that returnsSortedSetof the same element type as theConstraintStream.The default result of the collector (e.g. when never called) is an empty
SortedSet.- Type Parameters:
A- type of the matched factMapped- type of elements in the resulting set- Parameters:
groupValueMapping- converts matched facts to elements of the resulting set
-
toSortedSet
public static <A,Mapped> @NonNull UniConstraintCollector<A,?, toSortedSetSortedSet<Mapped>> (@NonNull Function<A, Mapped> groupValueMapping, @NonNull Comparator<? super Mapped> comparator) As defined bytoSortedSet(Function), only with a customComparator. -
toList
public static <A,Mapped> @NonNull UniConstraintCollector<A,?, toListList<Mapped>> (@NonNull Function<A, Mapped> groupValueMapping) Creates constraint collector that returnsListof the given element type. Makes no guarantees on iteration order. For stable iteration order, usetoSortedSet(Function).The default result of the collector (e.g. when never called) is an empty
List.- Type Parameters:
A- type of the matched factMapped- type of elements in the resulting collection- Parameters:
groupValueMapping- converts matched facts to elements of the resulting collection
-
toCollection
@Deprecated public static <A,B, BiConstraintCollector<A,Mapped, Result extends Collection<Mapped>> B, toCollection?, Result> (BiFunction<A, B, Mapped> groupValueMapping, IntFunction<Result> collectionFunction) Deprecated. -
toSet
public static <A,B, @NonNull BiConstraintCollector<A,Mapped> B, toSet?, Set<Mapped>> (@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bytoSet(Function). -
toSortedSet
public static <A,B, @NonNull BiConstraintCollector<A,Mapped extends Comparable<? super Mapped>> B, toSortedSet?, SortedSet<Mapped>> (@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bytoSortedSet(Function). -
toSortedSet
public static <A,B, @NonNull BiConstraintCollector<A,Mapped> B, toSortedSet?, SortedSet<Mapped>> (@NonNull BiFunction<A, B, Mapped> groupValueMapping, @NonNull Comparator<? super Mapped> comparator) As defined bytoSortedSet(Function, Comparator). -
toList
public static <A,B, @NonNull BiConstraintCollector<A,Mapped> B, toList?, List<Mapped>> (@NonNull BiFunction<A, B, Mapped> groupValueMapping) As defined bytoList(Function). -
toCollection
@Deprecated public static <A,B, TriConstraintCollector<A,C, Mapped, Result extends Collection<Mapped>> B, toCollectionC, ?, Result> (TriFunction<A, B, C, Mapped> groupValueMapping, IntFunction<Result> collectionFunction) Deprecated. -
toSet
public static <A,B, @NonNull TriConstraintCollector<A,C, Mapped> B, toSetC, ?, Set<Mapped>> (@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bytoSet(Function). -
toSortedSet
public static <A,B, @NonNull TriConstraintCollector<A,C, Mapped extends Comparable<? super Mapped>> B, toSortedSetC, ?, SortedSet<Mapped>> (@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bytoSortedSet(Function). -
toSortedSet
public static <A,B, @NonNull TriConstraintCollector<A,C, Mapped> B, toSortedSetC, ?, SortedSet<Mapped>> (@NonNull TriFunction<A, B, C, Mapped> groupValueMapping, @NonNull Comparator<? super Mapped> comparator) As defined bytoSortedSet(Function, Comparator). -
toList
public static <A,B, @NonNull TriConstraintCollector<A,C, Mapped> B, toListC, ?, List<Mapped>> (@NonNull TriFunction<A, B, C, Mapped> groupValueMapping) As defined bytoList(Function). -
toCollection
@Deprecated public static <A,B, QuadConstraintCollector<A,C, D, Mapped, Result extends Collection<Mapped>> B, toCollectionC, D, ?, Result> (QuadFunction<A, B, C, D, Mapped> groupValueMapping, IntFunction<Result> collectionFunction) Deprecated. -
toSet
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Mapped> B, toSetC, D, ?, Set<Mapped>> (@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bytoSet(Function). -
toSortedSet
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Mapped extends Comparable<? super Mapped>> B, toSortedSetC, D, ?, SortedSet<Mapped>> (@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bytoSortedSet(Function). -
toSortedSet
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Mapped> B, toSortedSetC, D, ?, SortedSet<Mapped>> (@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping, @NonNull Comparator<? super Mapped> comparator) As defined bytoSortedSet(Function, Comparator). -
toList
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Mapped> B, toListC, D, ?, List<Mapped>> (@NonNull QuadFunction<A, B, C, D, Mapped> groupValueMapping) As defined bytoList(Function). -
toMap
public static <A,Key, @NonNull UniConstraintCollector<A,Value> ?, toMapMap<Key, Set<Value>>> (@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper) Creates a constraint collector that returns aMapwith given keys and values consisting of aSetof mappings.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(toMap(Person::getAge, Person::getName))returns{20: [Ann, Eric], 25: [Beth], 30: [Cathy, David]}.Makes no guarantees on iteration order, neither for map entries, nor for the value sets. For stable iteration order, use
toSortedMap(Function, Function, IntFunction).The default result of the collector (e.g. when never called) is an empty
Map.- Type Parameters:
A- type of the matched factKey- type of map keyValue- type of map value- Parameters:
keyMapper- map matched fact to a map keyvalueMapper- map matched fact to a value
-
toMap
public static <A,Key, @NonNull UniConstraintCollector<A,Value, ValueSet extends Set<Value>> ?, toMapMap<Key, ValueSet>> (@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) Creates a constraint collector that returns aMapwith given keys and values consisting of aSetof mappings.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(toMap(Person::getAge, Person::getName))returns{20: [Ann, Eric], 25: [Beth], 30: [Cathy, David]}.Iteration order of value collections depends on the
Setprovided. Makes no guarantees on iteration order for map entries, usetoSortedMap(Function, Function, IntFunction)for that.The default result of the collector (e.g. when never called) is an empty
Map.- Type Parameters:
A- type of the matched factKey- type of map keyValue- type of map valueValueSet- type of the value set- Parameters:
keyMapper- map matched fact to a map keyvalueMapper- map matched fact to a valuevalueSetFunction- creates a set that will be used to store value mappings
-
toMap
public static <A,Key, @NonNull UniConstraintCollector<A,Value> ?, toMapMap<Key, Value>> (@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) Creates a constraint collector that returns aMap.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(toMap(Person::getAge, Person::getName, (name1, name2) -> name1 + " and " + name2)returns{20: "Ann and Eric", 25: "Beth", 30: "Cathy and David"}.Makes no guarantees on iteration order for map entries. For stable iteration order, use
toSortedMap(Function, Function, BinaryOperator).The default result of the collector (e.g. when never called) is an empty
Map.- Type Parameters:
A- type of the matched factKey- type of map keyValue- type of map value- Parameters:
keyMapper- map matched fact to a map keyvalueMapper- map matched fact to a valuemergeFunction- takes two values and merges them to one
-
toSortedMap
public static <A,Key extends Comparable<? super Key>, @NonNull UniConstraintCollector<A,Value> ?, toSortedMapSortedMap<Key, Set<Value>>> (@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper) Creates a constraint collector that returns aSortedMapwith given keys and values consisting of aSetof mappings.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(toMap(Person::getAge, Person::getName))returns{20: [Ann, Eric], 25: [Beth], 30: [Cathy, David]}.Makes no guarantees on iteration order for the value sets, use
toSortedMap(Function, Function, IntFunction)for that.The default result of the collector (e.g. when never called) is an empty
SortedMap.- Type Parameters:
A- type of the matched factKey- type of map keyValue- type of map value- Parameters:
keyMapper- map matched fact to a map keyvalueMapper- map matched fact to a value
-
toSortedMap
public static <A,Key extends Comparable<? super Key>, @NonNull UniConstraintCollector<A,Value, ValueSet extends Set<Value>> ?, toSortedMapSortedMap<Key, ValueSet>> (@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) Creates a constraint collector that returns aSortedMapwith given keys and values consisting of aSetof mappings.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(toMap(Person::getAge, Person::getName))returns{20: [Ann, Eric], 25: [Beth], 30: [Cathy, David]}.Iteration order of value collections depends on the
Setprovided.The default result of the collector (e.g. when never called) is an empty
SortedMap.- Type Parameters:
A- type of the matched factKey- type of map keyValue- type of map valueValueSet- type of the value set- Parameters:
keyMapper- map matched fact to a map keyvalueMapper- map matched fact to a valuevalueSetFunction- creates a set that will be used to store value mappings
-
toSortedMap
public static <A,Key extends Comparable<? super Key>, @NonNull UniConstraintCollector<A,Value> ?, toSortedMapSortedMap<Key, Value>> (@NonNull Function<? super A, ? extends Key> keyMapper, @NonNull Function<? super A, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) Creates a constraint collector that returns aSortedMap.For example,
[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)]with.groupBy(toMap(Person::getAge, Person::getName, (name1, name2) -> name1 + " and " + name2)returns{20: "Ann and Eric", 25: "Beth", 30: "Cathy and David"}.The default result of the collector (e.g. when never called) is an empty
SortedMap.- Type Parameters:
A- type of the matched factKey- type of map keyValue- type of map value- Parameters:
keyMapper- map matched fact to a map keyvalueMapper- map matched fact to a valuemergeFunction- takes two values and merges them to one
-
toMap
public static <A,B, @NonNull BiConstraintCollector<A,Key, Value> B, toMap?, Map<Key, Set<Value>>> (@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper) As defined bytoMap(Function, Function). -
toMap
public static <A,B, @NonNull BiConstraintCollector<A,Key, Value, ValueSet extends Set<Value>> B, toMap?, Map<Key, ValueSet>> (@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoMap(Function, Function, IntFunction). -
toMap
public static <A,B, @NonNull BiConstraintCollector<A,Key, Value> B, toMap?, Map<Key, Value>> (@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoMap(Function, Function, BinaryOperator). -
toSortedMap
public static <A,B, @NonNull BiConstraintCollector<A,Key extends Comparable<? super Key>, Value> B, toSortedMap?, SortedMap<Key, Set<Value>>> (@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper) As defined bytoSortedMap(Function, Function). -
toSortedMap
public static <A,B, @NonNull BiConstraintCollector<A,Key extends Comparable<? super Key>, Value, ValueSet extends Set<Value>> B, toSortedMap?, SortedMap<Key, ValueSet>> (@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoSortedMap(Function, Function, IntFunction). -
toSortedMap
public static <A,B, @NonNull BiConstraintCollector<A,Key extends Comparable<? super Key>, Value> B, toSortedMap?, SortedMap<Key, Value>> (@NonNull BiFunction<? super A, ? super B, ? extends Key> keyMapper, @NonNull BiFunction<? super A, ? super B, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoSortedMap(Function, Function, BinaryOperator). -
toMap
public static <A,B, @NonNull TriConstraintCollector<A,C, Key, Value> B, toMapC, ?, Map<Key, Set<Value>>> (@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper) As defined bytoMap(Function, Function). -
toMap
public static <A,B, @NonNull TriConstraintCollector<A,C, Key, Value, ValueSet extends Set<Value>> B, toMapC, ?, Map<Key, ValueSet>> (@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoMap(Function, Function, IntFunction). -
toMap
public static <A,B, @NonNull TriConstraintCollector<A,C, Key, Value> B, toMapC, ?, Map<Key, Value>> (@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoMap(Function, Function, BinaryOperator). -
toSortedMap
public static <A,B, @NonNull TriConstraintCollector<A,C, Key extends Comparable<? super Key>, Value> B, toSortedMapC, ?, SortedMap<Key, Set<Value>>> (@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper) As defined bytoSortedMap(Function, Function). -
toSortedMap
public static <A,B, @NonNull TriConstraintCollector<A,C, Key extends Comparable<? super Key>, Value, ValueSet extends Set<Value>> B, toSortedMapC, ?, SortedMap<Key, ValueSet>> (@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoSortedMap(Function, Function, IntFunction). -
toSortedMap
public static <A,B, @NonNull TriConstraintCollector<A,C, Key extends Comparable<? super Key>, Value> B, toSortedMapC, ?, SortedMap<Key, Value>> (@NonNull TriFunction<? super A, ? super B, ? super C, ? extends Key> keyMapper, @NonNull TriFunction<? super A, ? super B, ? super C, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoSortedMap(Function, Function, BinaryOperator). -
toMap
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Key, Value> B, toMapC, D, ?, Map<Key, Set<Value>>> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper) As defined bytoMap(Function, Function). -
toMap
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Key, Value, ValueSet extends Set<Value>> B, toMapC, D, ?, Map<Key, ValueSet>> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoMap(Function, Function, IntFunction). -
toMap
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Key, Value> B, toMapC, D, ?, Map<Key, Value>> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoMap(Function, Function, BinaryOperator). -
toSortedMap
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Key extends Comparable<? super Key>, Value> B, toSortedMapC, D, ?, SortedMap<Key, Set<Value>>> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper) As defined bytoSortedMap(Function, Function). -
toSortedMap
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Key extends Comparable<? super Key>, Value, ValueSet extends Set<Value>> B, toSortedMapC, D, ?, SortedMap<Key, ValueSet>> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper, @NonNull IntFunction<ValueSet> valueSetFunction) As defined bytoSortedMap(Function, Function, IntFunction). -
toSortedMap
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Key extends Comparable<? super Key>, Value> B, toSortedMapC, D, ?, SortedMap<Key, Value>> (@NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Key> keyMapper, @NonNull QuadFunction<? super A, ? super B, ? super C, ? super D, ? extends Value> valueMapper, @NonNull BinaryOperator<Value> mergeFunction) As defined bytoSortedMap(Function, Function, BinaryOperator). -
conditionally
public static <A,ResultContainer_, @NonNull UniConstraintCollector<A,Result_> ResultContainer_, conditionallyResult_> (@NonNull Predicate<A> condition, @NonNull UniConstraintCollector<A, ResultContainer_, Result_> delegate) Returns a collector that delegates to the underlying collector if and only if the input tuple meets the given condition.The result of the collector is always the underlying collector's result. Therefore the default result of the collector (e.g. when never called) is the default result of the underlying collector.
- Type Parameters:
A- generic type of the tuple variableResultContainer_- generic type of the result containerResult_- generic type of the collector's return value- Parameters:
condition- condition to meet in order to delegate to the underlying collectordelegate- the underlying collector to delegate to
-
conditionally
public static <A,B, @NonNull BiConstraintCollector<A,ResultContainer_, Result_> B, conditionallyResultContainer_, Result_> (@NonNull BiPredicate<A, B> condition, @NonNull BiConstraintCollector<A, B, ResultContainer_, Result_> delegate) As defined byconditionally(Predicate, UniConstraintCollector). -
conditionally
public static <A,B, @NonNull TriConstraintCollector<A,C, ResultContainer_, Result_> B, conditionallyC, ResultContainer_, Result_> (@NonNull TriPredicate<A, B, C> condition, @NonNull TriConstraintCollector<A, B, C, ResultContainer_, Result_> delegate) As defined byconditionally(Predicate, UniConstraintCollector). -
conditionally
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, ResultContainer_, Result_> B, conditionallyC, D, ResultContainer_, Result_> (@NonNull QuadPredicate<A, B, C, D> condition, @NonNull QuadConstraintCollector<A, B, C, D, ResultContainer_, Result_> delegate) As defined byconditionally(Predicate, UniConstraintCollector). -
collectAndThen
public static <A,Intermediate_, @NonNull UniConstraintCollector<A,Result_> ?, collectAndThenResult_> (@NonNull UniConstraintCollector<A, ?, Intermediate_> delegate, @NonNull Function<Intermediate_, Result_> mappingFunction) Returns a collector that delegates to the underlying collector and maps its result to another value.This is a better performing alternative to
.groupBy(...).map(...).- Type Parameters:
A- generic type of the tuple variableIntermediate_- generic type of the delegate's return valueResult_- generic type of the final colector's return value- Parameters:
delegate- the underlying collector to delegate tomappingFunction- maps the result of the underlying collector to another value
-
collectAndThen
public static <A,B, @NonNull BiConstraintCollector<A,Intermediate_, Result_> B, collectAndThen?, Result_> (@NonNull BiConstraintCollector<A, B, ?, Intermediate_> delegate, @NonNull Function<Intermediate_, Result_> mappingFunction) As defined bycollectAndThen(UniConstraintCollector, Function). -
collectAndThen
public static <A,B, @NonNull TriConstraintCollector<A,C, Intermediate_, Result_> B, collectAndThenC, ?, Result_> (@NonNull TriConstraintCollector<A, B, C, ?, Intermediate_> delegate, @NonNull Function<Intermediate_, Result_> mappingFunction) As defined bycollectAndThen(UniConstraintCollector, Function). -
collectAndThen
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Intermediate_, Result_> B, collectAndThenC, D, ?, Result_> (@NonNull QuadConstraintCollector<A, B, C, D, ?, Intermediate_> delegate, @NonNull Function<Intermediate_, Result_> mappingFunction) As defined bycollectAndThen(UniConstraintCollector, Function). -
compose
public static <A,Result_, @NonNull UniConstraintCollector<A,SubResultContainer1_, SubResultContainer2_, SubResult1_, SubResult2_> ?, composeResult_> (@NonNull UniConstraintCollector<A, SubResultContainer1_, SubResult1_> subCollector1, @NonNull UniConstraintCollector<A, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiFunction<SubResult1_, SubResult2_, Result_> composeFunction) Returns a constraint collector the result of which is a composition of other constraint collectors. The return value of this collector, incl. the default return value, depends solely on the compose function.- Type Parameters:
A- generic type of the tuple variableResult_- generic type of the parent collector's return valueSubResultContainer1_- generic type of the first sub collector's result containerSubResultContainer2_- generic type of the second sub collector's result containerSubResult1_- generic type of the first sub collector's return valueSubResult2_- generic type of the second sub collector's return value- Parameters:
subCollector1- first collector to composesubCollector2- second collector to composecomposeFunction- turns results of the sub collectors to a result of the parent collector
-
compose
public static <A,Result_, @NonNull UniConstraintCollector<A,SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResult1_, SubResult2_, SubResult3_> ?, composeResult_> (@NonNull UniConstraintCollector<A, SubResultContainer1_, SubResult1_> subCollector1, @NonNull UniConstraintCollector<A, SubResultContainer2_, SubResult2_> subCollector2, @NonNull UniConstraintCollector<A, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriFunction<SubResult1_, SubResult2_, SubResult3_, Result_> composeFunction) Returns a constraint collector the result of which is a composition of other constraint collectors. The return value of this collector, incl. the default return value, depends solely on the compose function.- Type Parameters:
A- generic type of the tuple variableResult_- generic type of the parent collector's return valueSubResultContainer1_- generic type of the first sub collector's result containerSubResultContainer2_- generic type of the second sub collector's result containerSubResultContainer3_- generic type of the third sub collector's result containerSubResult1_- generic type of the first sub collector's return valueSubResult2_- generic type of the second sub collector's return valueSubResult3_- generic type of the third sub collector's return value- Parameters:
subCollector1- first collector to composesubCollector2- second collector to composesubCollector3- third collector to composecomposeFunction- turns results of the sub collectors to a result of the parent collector
-
compose
public static <A,Result_, @NonNull UniConstraintCollector<A,SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResultContainer4_, SubResult1_, SubResult2_, SubResult3_, SubResult4_> ?, composeResult_> (@NonNull UniConstraintCollector<A, SubResultContainer1_, SubResult1_> subCollector1, @NonNull UniConstraintCollector<A, SubResultContainer2_, SubResult2_> subCollector2, @NonNull UniConstraintCollector<A, SubResultContainer3_, SubResult3_> subCollector3, @NonNull UniConstraintCollector<A, SubResultContainer4_, SubResult4_> subCollector4, @NonNull QuadFunction<SubResult1_, SubResult2_, SubResult3_, SubResult4_, Result_> composeFunction) Returns a constraint collector the result of which is a composition of other constraint collectors. The return value of this collector, incl. the default return value, depends solely on the compose function.- Type Parameters:
A- generic type of the tuple variableResult_- generic type of the parent collector's return valueSubResultContainer1_- generic type of the first sub collector's result containerSubResultContainer2_- generic type of the second sub collector's result containerSubResultContainer3_- generic type of the third sub collector's result containerSubResultContainer4_- generic type of the fourth sub collector's result containerSubResult1_- generic type of the first sub collector's return valueSubResult2_- generic type of the second sub collector's return valueSubResult3_- generic type of the third sub collector's return valueSubResult4_- generic type of the fourth sub collector's return value- Parameters:
subCollector1- first collector to composesubCollector2- second collector to composesubCollector3- third collector to composesubCollector4- fourth collector to composecomposeFunction- turns results of the sub collectors to a result of the parent collector
-
compose
public static <A,B, @NonNull BiConstraintCollector<A,Result_, SubResultContainer1_, SubResultContainer2_, SubResult1_, SubResult2_> B, compose?, Result_> (@NonNull BiConstraintCollector<A, B, SubResultContainer1_, SubResult1_> subCollector1, @NonNull BiConstraintCollector<A, B, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiFunction<SubResult1_, SubResult2_, Result_> composeFunction) -
compose
public static <A,B, @NonNull BiConstraintCollector<A,Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResult1_, SubResult2_, SubResult3_> B, compose?, Result_> (@NonNull BiConstraintCollector<A, B, SubResultContainer1_, SubResult1_> subCollector1, @NonNull BiConstraintCollector<A, B, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiConstraintCollector<A, B, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriFunction<SubResult1_, SubResult2_, SubResult3_, Result_> composeFunction) -
compose
public static <A,B, @NonNull BiConstraintCollector<A,Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResultContainer4_, SubResult1_, SubResult2_, SubResult3_, SubResult4_> B, compose?, Result_> (@NonNull BiConstraintCollector<A, B, SubResultContainer1_, SubResult1_> subCollector1, @NonNull BiConstraintCollector<A, B, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiConstraintCollector<A, B, SubResultContainer3_, SubResult3_> subCollector3, @NonNull BiConstraintCollector<A, B, SubResultContainer4_, SubResult4_> subCollector4, @NonNull QuadFunction<SubResult1_, SubResult2_, SubResult3_, SubResult4_, Result_> composeFunction) -
compose
public static <A,B, @NonNull TriConstraintCollector<A,C, Result_, SubResultContainer1_, SubResultContainer2_, SubResult1_, SubResult2_> B, composeC, ?, Result_> (@NonNull TriConstraintCollector<A, B, C, SubResultContainer1_, SubResult1_> subCollector1, @NonNull TriConstraintCollector<A, B, C, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiFunction<SubResult1_, SubResult2_, Result_> composeFunction) -
compose
public static <A,B, @NonNull TriConstraintCollector<A,C, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResult1_, SubResult2_, SubResult3_> B, composeC, ?, Result_> (@NonNull TriConstraintCollector<A, B, C, SubResultContainer1_, SubResult1_> subCollector1, @NonNull TriConstraintCollector<A, B, C, SubResultContainer2_, SubResult2_> subCollector2, @NonNull TriConstraintCollector<A, B, C, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriFunction<SubResult1_, SubResult2_, SubResult3_, Result_> composeFunction) -
compose
public static <A,B, @NonNull TriConstraintCollector<A,C, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResultContainer4_, SubResult1_, SubResult2_, SubResult3_, SubResult4_> B, composeC, ?, Result_> (@NonNull TriConstraintCollector<A, B, C, SubResultContainer1_, SubResult1_> subCollector1, @NonNull TriConstraintCollector<A, B, C, SubResultContainer2_, SubResult2_> subCollector2, @NonNull TriConstraintCollector<A, B, C, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriConstraintCollector<A, B, C, SubResultContainer4_, SubResult4_> subCollector4, @NonNull QuadFunction<SubResult1_, SubResult2_, SubResult3_, SubResult4_, Result_> composeFunction) -
compose
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Result_, SubResultContainer1_, SubResultContainer2_, SubResult1_, SubResult2_> B, composeC, D, ?, Result_> (@NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer1_, SubResult1_> subCollector1, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer2_, SubResult2_> subCollector2, @NonNull BiFunction<SubResult1_, SubResult2_, Result_> composeFunction) -
compose
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResult1_, SubResult2_, SubResult3_> B, composeC, D, ?, Result_> (@NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer1_, SubResult1_> subCollector1, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer2_, SubResult2_> subCollector2, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer3_, SubResult3_> subCollector3, @NonNull TriFunction<SubResult1_, SubResult2_, SubResult3_, Result_> composeFunction) -
compose
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Result_, SubResultContainer1_, SubResultContainer2_, SubResultContainer3_, SubResultContainer4_, SubResult1_, SubResult2_, SubResult3_, SubResult4_> B, composeC, D, ?, Result_> (@NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer1_, SubResult1_> subCollector1, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer2_, SubResult2_> subCollector2, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer3_, SubResult3_> subCollector3, @NonNull QuadConstraintCollector<A, B, C, D, SubResultContainer4_, SubResult4_> subCollector4, @NonNull QuadFunction<SubResult1_, SubResult2_, SubResult3_, SubResult4_, Result_> composeFunction) -
toConsecutiveSequences
public static <A> @NonNull UniConstraintCollector<A,?, toConsecutiveSequencesSequenceChain<A, Integer>> (@NonNull ToIntFunction<A> indexMap) Creates a constraint collector that returnsSequenceChainabout the first fact. For instance,[Shift slot=1] [Shift slot=2] [Shift slot=4] [Shift slot=6]returns the following information:Consecutive Lengths: 2, 1, 1 Break Lengths: 2, 2 Consecutive Items: [[Shift slot=1] [Shift slot=2]], [[Shift slot=4]], [[Shift slot=6]]- Type Parameters:
A- type of the first mapped fact- Parameters:
indexMap- Maps the fact to its position in the sequence
-
toConsecutiveSequences
public static <A,B, @NonNull BiConstraintCollector<A,Result_> B, toConsecutiveSequences?, SequenceChain<Result_, Integer>> (@NonNull BiFunction<A, B, Result_> resultMap, @NonNull ToIntFunction<Result_> indexMap) As defined bytoConsecutiveSequences(ToIntFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factResult_- type of item in the sequence- Parameters:
resultMap- Maps both facts to an item in the sequenceindexMap- Maps the item to its position in the sequence
-
toConsecutiveSequences
public static <A,B, @NonNull TriConstraintCollector<A,C, Result_> B, toConsecutiveSequencesC, ?, SequenceChain<Result_, Integer>> (@NonNull TriFunction<A, B, C, Result_> resultMap, @NonNull ToIntFunction<Result_> indexMap) As defined bytoConsecutiveSequences(ToIntFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factC- type of the third mapped factResult_- type of item in the sequence- Parameters:
resultMap- Maps the three facts to an item in the sequenceindexMap- Maps the item to its position in the sequence
-
toConsecutiveSequences
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Result_> B, toConsecutiveSequencesC, D, ?, SequenceChain<Result_, Integer>> (@NonNull QuadFunction<A, B, C, D, Result_> resultMap, @NonNull ToIntFunction<Result_> indexMap) As defined bytoConsecutiveSequences(ToIntFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factC- type of the third mapped factD- type of the fourth mapped factResult_- type of item in the sequence- Parameters:
resultMap- Maps the four facts to an item in the sequenceindexMap- Maps the item to its position in the sequence
-
toConnectedRanges
public static <A,PointType_ extends Comparable<PointType_>, @NonNull UniConstraintCollector<A,DifferenceType_ extends Comparable<DifferenceType_>> ?, toConnectedRangesConnectedRangeChain<A, PointType_, DifferenceType_>> (@NonNull Function<A, PointType_> startInclusiveMap, @NonNull Function<A, PointType_> endExclusiveMap, @NonNull BiFunction<PointType_, PointType_, DifferenceType_> differenceFunction) Creates a constraint collector that returnsConnectedRangeChainabout the first fact. For instance,[Equipment fromInclusive=2, toExclusive=4] [Equipment fromInclusive=3, toExclusive=5] [Equipment fromInclusive=6, toExclusive=7] [Equipment fromInclusive=7, toExclusive=8]returns the following information:
This can be used to ensure a limited resource is not over-assigned.ConnectedRanges: [mininumOverlap: 1, maximumOverlap: 2, [Equipment fromInclusive=2, toExclusive=4] [Equipment fromInclusive=3, toExclusive=5]], [mininumOverlap: 1, maximumOverlap: 1, [Equipment fromInclusive=6, toExclusive=7] [Equipment fromInclusive=7, toExclusive=8]] Breaks: [[Break from=5, to=6, length=1]]- Type Parameters:
A- type of the first mapped factPointType_- type of the fact endpointsDifferenceType_- type of difference between points- Parameters:
startInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its enddifferenceFunction- Computes the difference between two points. The second argument is always larger than the first (ex:Duration.between(java.time.temporal.Temporal, java.time.temporal.Temporal)or(a,b) -> b - a).
-
toConnectedTemporalRanges
public static <A,PointType_ extends Temporal & Comparable<PointType_>> @NonNull UniConstraintCollector<A,?, toConnectedTemporalRangesConnectedRangeChain<A, PointType_, Duration>> (@NonNull Function<A, PointType_> startInclusiveMap, @NonNull Function<A, PointType_> endExclusiveMap) Specialized version oftoConnectedRanges(Function,Function,BiFunction)forTemporaltypes.If you intend to use date-based
temporals(such asLocalDate), convert them to their time-based equivalents using (localDate.atStartOfDay(). Alternatively, usethe non-specialized methodand providedifferenceFunctionwhich doesn't use `Duration` as the type to represent the difference.- Type Parameters:
A- type of the first mapped factPointType_- temporal type of the endpoints, needs to support seconds- Parameters:
startInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its end
-
toConnectedRanges
public static <A> @NonNull UniConstraintCollector<A,?, toConnectedRangesConnectedRangeChain<A, Long, Long>> (@NonNull ToLongFunction<A> startInclusiveMap, @NonNull ToLongFunction<A> endExclusiveMap) Specialized version oftoConnectedRanges(Function,Function,BiFunction)for Long.- Type Parameters:
A- type of the first mapped fact- Parameters:
startInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its end
-
toConnectedRanges
public static <A,B, @NonNull BiConstraintCollector<A,IntervalType_, PointType_ extends Comparable<PointType_>, DifferenceType_ extends Comparable<DifferenceType_>> B, toConnectedRanges?, ConnectedRangeChain<IntervalType_, PointType_, DifferenceType_>> (@NonNull BiFunction<A, B, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap, @NonNull BiFunction<PointType_, PointType_, DifferenceType_> differenceFunction) As defined bytoConnectedRanges(Function,Function,BiFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factIntervalType_- type of the item in the clusterPointType_- type of the item endpointsDifferenceType_- type of difference between points- Parameters:
intervalMap- Maps both facts to an item in the clusterstartInclusiveMap- Maps the item to its startendExclusiveMap- Maps the item to its enddifferenceFunction- Computes the difference between two points. The second argument is always larger than the first (ex:Duration.between(java.time.temporal.Temporal, java.time.temporal.Temporal)or(a,b) -> b - a).
-
toConnectedTemporalRanges
public static <A,B, @NonNull BiConstraintCollector<A,IntervalType_, PointType_ extends Temporal & Comparable<PointType_>> B, toConnectedTemporalRanges?, ConnectedRangeChain<IntervalType_, PointType_, Duration>> (@NonNull BiFunction<A, B, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap) As defined bytoConnectedTemporalRanges(Function,Function).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factIntervalType_- type of the item in the clusterPointType_- temporal type of the endpoints, needs to support seconds- Parameters:
intervalMap- Maps the three facts to an item in the clusterstartInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its end
-
toConnectedRanges
public static <A,B, @NonNull BiConstraintCollector<A,IntervalType_> B, toConnectedRanges?, ConnectedRangeChain<IntervalType_, Long, Long>> (@NonNull BiFunction<A, B, IntervalType_> intervalMap, @NonNull ToLongFunction<IntervalType_> startInclusiveMap, @NonNull ToLongFunction<IntervalType_> endExclusiveMap) As defined bytoConnectedRanges(ToLongFunction, ToLongFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factIntervalType_- type of the item in the cluster- Parameters:
startInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its end
-
toConnectedRanges
public static <A,B, @NonNull TriConstraintCollector<A,C, IntervalType_, PointType_ extends Comparable<PointType_>, DifferenceType_ extends Comparable<DifferenceType_>> B, toConnectedRangesC, ?, ConnectedRangeChain<IntervalType_, PointType_, DifferenceType_>> (@NonNull TriFunction<A, B, C, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap, @NonNull BiFunction<PointType_, PointType_, DifferenceType_> differenceFunction) As defined bytoConnectedRanges(Function,Function,BiFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factC- type of the third mapped factIntervalType_- type of the item in the clusterPointType_- type of the item endpointsDifferenceType_- type of difference between points- Parameters:
intervalMap- Maps the three facts to an item in the clusterstartInclusiveMap- Maps the item to its startendExclusiveMap- Maps the item to its enddifferenceFunction- Computes the difference between two points. The second argument is always larger than the first (ex:Duration.between(java.time.temporal.Temporal, java.time.temporal.Temporal)or(a,b) -> b - a).
-
toConnectedTemporalRanges
public static <A,B, @NonNull TriConstraintCollector<A,C, IntervalType_, PointType_ extends Temporal & Comparable<PointType_>> B, toConnectedTemporalRangesC, ?, ConnectedRangeChain<IntervalType_, PointType_, Duration>> (@NonNull TriFunction<A, B, C, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap) As defined bytoConnectedTemporalRanges(Function,Function).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factC- type of the third mapped factIntervalType_- type of the item in the clusterPointType_- temporal type of the endpoints, needs to support seconds- Parameters:
intervalMap- Maps the three facts to an item in the clusterstartInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its end
-
toConnectedRanges
public static <A,B, @NonNull TriConstraintCollector<A,C, IntervalType_> B, toConnectedRangesC, ?, ConnectedRangeChain<IntervalType_, Long, Long>> (@NonNull TriFunction<A, B, C, IntervalType_> intervalMap, @NonNull ToLongFunction<IntervalType_> startInclusiveMap, @NonNull ToLongFunction<IntervalType_> endExclusiveMap) As defined bytoConnectedRanges(ToLongFunction, ToLongFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factC- type of the third mapped factIntervalType_- type of the item in the cluster- Parameters:
startInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its end
-
toConnectedRanges
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, IntervalType_, PointType_ extends Comparable<PointType_>, DifferenceType_ extends Comparable<DifferenceType_>> B, toConnectedRangesC, D, ?, ConnectedRangeChain<IntervalType_, PointType_, DifferenceType_>> (@NonNull QuadFunction<A, B, C, D, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap, @NonNull BiFunction<PointType_, PointType_, DifferenceType_> differenceFunction) As defined bytoConnectedRanges(Function,Function,BiFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factC- type of the third mapped factD- type of the fourth mapped factIntervalType_- type of the item in the clusterPointType_- type of the item endpointsDifferenceType_- type of difference between points- Parameters:
intervalMap- Maps the four facts to an item in the clusterstartInclusiveMap- Maps the item to its startendExclusiveMap- Maps the item to its enddifferenceFunction- Computes the difference between two points. The second argument is always larger than the first (ex:Duration.between(java.time.temporal.Temporal, java.time.temporal.Temporal)or(a,b) -> b - a).
-
toConnectedTemporalRanges
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, IntervalType_, PointType_ extends Temporal & Comparable<PointType_>> B, toConnectedTemporalRangesC, D, ?, ConnectedRangeChain<IntervalType_, PointType_, Duration>> (@NonNull QuadFunction<A, B, C, D, IntervalType_> intervalMap, @NonNull Function<IntervalType_, PointType_> startInclusiveMap, @NonNull Function<IntervalType_, PointType_> endExclusiveMap) As defined bytoConnectedTemporalRanges(Function,Function).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factC- type of the third mapped factD- type of the fourth mapped factIntervalType_- type of the item in the clusterPointType_- temporal type of the endpoints, needs to support seconds- Parameters:
intervalMap- Maps the three facts to an item in the clusterstartInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its end
-
toConnectedRanges
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, IntervalType_> B, toConnectedRangesC, D, ?, ConnectedRangeChain<IntervalType_, Long, Long>> (@NonNull QuadFunction<A, B, C, D, IntervalType_> intervalMap, @NonNull ToLongFunction<IntervalType_> startInclusiveMap, @NonNull ToLongFunction<IntervalType_> endExclusiveMap) As defined bytoConnectedRanges(ToLongFunction, ToLongFunction).- Type Parameters:
A- type of the first mapped factB- type of the second mapped factC- type of the third mapped factD- type of the fourth mapped factIntervalType_- type of the item in the cluster- Parameters:
startInclusiveMap- Maps the fact to its startendExclusiveMap- Maps the fact to its end
-
loadBalance
public static <A,Balanced_> @NonNull UniConstraintCollector<A,?, loadBalanceLoadBalance<Balanced_>> (@NonNull Function<A, Balanced_> balancedItemFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction), where the current load for each balanced item is set to one and the starting load for each balanced item is set to zero. -
loadBalance
public static <A,Balanced_> @NonNull UniConstraintCollector<A,?, loadBalanceLoadBalance<Balanced_>> (@NonNull Function<A, Balanced_> balancedItemFunction, @NonNull ToLongFunction<A> loadFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction), where the starting load for each balanced item is set to zero. -
loadBalance
public static <A,Balanced_> @NonNull UniConstraintCollector<A,?, loadBalanceLoadBalance<Balanced_>> (@NonNull Function<A, Balanced_> balancedItemFunction, @NonNull ToLongFunction<A> loadFunction, @NonNull ToLongFunction<A> initialLoadFunction) Returns a collector that takes a stream of items and calculates the unfairness measure from them (seeLoadBalance.unfairness()). The load for every item is provided by the loadFunction, with the starting load provided by the initialLoadFunction.When this collector is used in a constraint stream, it is recommended that the score type be one of those based on
BigDecimal, such asHardSoftBigDecimalScore. This is so that the unfairness measure keeps its precision without forcing the other constraints to be multiplied by a large constant, which would otherwise be required to implement fixed-point arithmetic.- Type Parameters:
A- type of the matched factBalanced_- type of the item being balanced- Parameters:
balancedItemFunction- The function that returns the item which should be load-balanced.loadFunction- How much the item should count for in the formula.initialLoadFunction- The initial value of the metric, allowing to provide initial state without requiring the entire previous planning windows in the working memory.
-
loadBalance
public static <A,B, @NonNull BiConstraintCollector<A,Balanced_> B, loadBalance?, LoadBalance<Balanced_>> (@NonNull BiFunction<A, B, Balanced_> balancedItemFunction) As defined byloadBalance(BiFunction, ToLongBiFunction, ToLongBiFunction), where the current load for each balanced item is set to one and the starting load for each balanced item is set to zero. -
loadBalance
public static <A,B, @NonNull BiConstraintCollector<A,Balanced_> B, loadBalance?, LoadBalance<Balanced_>> (@NonNull BiFunction<A, B, Balanced_> balancedItemFunction, @NonNull ToLongBiFunction<A, B> loadFunction) As defined byloadBalance(BiFunction, ToLongBiFunction, ToLongBiFunction), where the starting load for each balanced item is set to zero. -
loadBalance
public static <A,B, @NonNull BiConstraintCollector<A,Balanced_> B, loadBalance?, LoadBalance<Balanced_>> (@NonNull BiFunction<A, B, Balanced_> balancedItemFunction, @NonNull ToLongBiFunction<A, B> loadFunction, @NonNull ToLongBiFunction<A, B> initialLoadFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction). -
loadBalance
public static <A,B, @NonNull TriConstraintCollector<A,C, Balanced_> B, loadBalanceC, ?, LoadBalance<Balanced_>> (@NonNull TriFunction<A, B, C, Balanced_> balancedItemFunction) As defined byloadBalance(TriFunction, ToLongTriFunction, ToLongTriFunction), where the current load for each balanced item is set to one and the starting load for each balanced item is set to zero. -
loadBalance
public static <A,B, @NonNull TriConstraintCollector<A,C, Balanced_> B, loadBalanceC, ?, LoadBalance<Balanced_>> (@NonNull TriFunction<A, B, C, Balanced_> balancedItemFunction, @NonNull ToLongTriFunction<A, B, C> loadFunction) As defined byloadBalance(TriFunction, ToLongTriFunction, ToLongTriFunction), where the starting load for each balanced item is set to zero. -
loadBalance
public static <A,B, @NonNull TriConstraintCollector<A,C, Balanced_> B, loadBalanceC, ?, LoadBalance<Balanced_>> (@NonNull TriFunction<A, B, C, Balanced_> balancedItemFunction, @NonNull ToLongTriFunction<A, B, C> loadFunction, @NonNull ToLongTriFunction<A, B, C> initialLoadFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction). -
loadBalance
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Balanced_> B, loadBalanceC, D, ?, LoadBalance<Balanced_>> (@NonNull QuadFunction<A, B, C, D, Balanced_> balancedItemFunction) As defined byloadBalance(QuadFunction, ToLongQuadFunction, ToLongQuadFunction), where the current load for each balanced item is set to one and the starting load for each balanced item is set to zero. -
loadBalance
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Balanced_> B, loadBalanceC, D, ?, LoadBalance<Balanced_>> (@NonNull QuadFunction<A, B, C, D, Balanced_> balancedItemFunction, @NonNull ToLongQuadFunction<A, B, C, D> loadFunction) As defined byloadBalance(QuadFunction, ToLongQuadFunction, ToLongQuadFunction), where the starting load for each balanced item is set to zero. -
loadBalance
public static <A,B, @NonNull QuadConstraintCollector<A,C, D, Balanced_> B, loadBalanceC, D, ?, LoadBalance<Balanced_>> (@NonNull QuadFunction<A, B, C, D, Balanced_> balancedItemFunction, @NonNull ToLongQuadFunction<A, B, C, D> loadFunction, @NonNull ToLongQuadFunction<A, B, C, D> initialLoadFunction) As defined byloadBalance(Function, ToLongFunction, ToLongFunction).
-
max(QuadFunction, Function), as this method can lead to unavoidable score corruptions.