A
- the type of the first and only fact in the tuple.public interface UniConstraintStream<A> extends ConstraintStream
ConstraintStream
that matches one fact.ConstraintStream
Modifier and Type | Method and Description |
---|---|
UniConstraintStream<A> |
filter(Predicate<A> predicate)
Exhaustively test each fact against the
Predicate
and match if Predicate.test(Object) returns true. |
<GroupKey_> |
groupBy(Function<A,GroupKey_> groupKeyMapping)
Convert the
UniConstraintStream to a different UniConstraintStream , containing the set of tuples
resulting from applying the group key mapping function on all tuples of the original stream. |
<GroupKey_,ResultContainer_,Result_> |
groupBy(Function<A,GroupKey_> groupKeyMapping,
UniConstraintCollector<A,ResultContainer_,Result_> collector)
Convert the
UniConstraintStream to a BiConstraintStream , consisting of unique tuples with two
facts. |
<GroupKeyA_,GroupKeyB_> |
groupBy(Function<A,GroupKeyA_> groupKeyAMapping,
Function<A,GroupKeyB_> groupKeyBMapping)
Convert the
UniConstraintStream to a BiConstraintStream , consisting of unique tuples with two
facts. |
<GroupKeyA_,GroupKeyB_,ResultContainer_,Result_> |
groupBy(Function<A,GroupKeyA_> groupKeyAMapping,
Function<A,GroupKeyB_> groupKeyBMapping,
UniConstraintCollector<A,ResultContainer_,Result_> collector)
Combines the semantics of
groupBy(Function, Function) and groupBy(UniConstraintCollector) . |
<GroupKeyA_,GroupKeyB_,ResultContainerC_,ResultC_,ResultContainerD_,ResultD_> |
groupBy(Function<A,GroupKeyA_> groupKeyAMapping,
Function<A,GroupKeyB_> groupKeyBMapping,
UniConstraintCollector<A,ResultContainerC_,ResultC_> collectorC,
UniConstraintCollector<A,ResultContainerD_,ResultD_> collectorD)
Combines the semantics of
groupBy(Function, Function) and groupBy(UniConstraintCollector) . |
<ResultContainer_,Result_> |
groupBy(UniConstraintCollector<A,ResultContainer_,Result_> collector)
Convert the
UniConstraintStream to a different UniConstraintStream , containing only a single
tuple, the result of applying UniConstraintCollector . |
<B> UniConstraintStream<A> |
ifExists(Class<B> otherClass,
BiJoiner<A,B>... joiners)
As defined by
ifExists(Class, BiJoiner) . |
default <B> UniConstraintStream<A> |
ifExists(Class<B> otherClass,
BiJoiner<A,B> joiner)
Create a new
UniConstraintStream for every A where B exists for which the BiJoiner is true
(for the properties it extracts from both facts). |
default <B> UniConstraintStream<A> |
ifExists(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2)
As defined by
ifExists(Class, BiJoiner) . |
default <B> UniConstraintStream<A> |
ifExists(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2,
BiJoiner<A,B> joiner3)
As defined by
ifExists(Class, BiJoiner) . |
default <B> UniConstraintStream<A> |
ifExists(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2,
BiJoiner<A,B> joiner3,
BiJoiner<A,B> joiner4)
As defined by
ifExists(Class, BiJoiner) . |
default UniConstraintStream<A> |
ifExistsOther(Class<A> otherClass)
Create a new
UniConstraintStream for every A, if another A exists that does not #equals(Object)
the first. |
default UniConstraintStream<A> |
ifExistsOther(Class<A> otherClass,
BiJoiner<A,A>... joiners)
As defined by
ifExistsOther(Class, BiJoiner) . |
default UniConstraintStream<A> |
ifExistsOther(Class<A> otherClass,
BiJoiner<A,A> joiner)
Create a new
UniConstraintStream for every A, if another A exists that does not #equals(Object)
the first, and for which the BiJoiner is true (for the properties it extracts from both facts). |
default UniConstraintStream<A> |
ifExistsOther(Class<A> otherClass,
BiJoiner<A,A> joiner1,
BiJoiner<A,A> joiner2)
As defined by
ifExistsOther(Class, BiJoiner) . |
default UniConstraintStream<A> |
ifExistsOther(Class<A> otherClass,
BiJoiner<A,A> joiner1,
BiJoiner<A,A> joiner2,
BiJoiner<A,A> joiner3)
As defined by
ifExistsOther(Class, BiJoiner) . |
default UniConstraintStream<A> |
ifExistsOther(Class<A> otherClass,
BiJoiner<A,A> joiner1,
BiJoiner<A,A> joiner2,
BiJoiner<A,A> joiner3,
BiJoiner<A,A> joiner4)
As defined by
ifExistsOther(Class, BiJoiner) . |
<B> UniConstraintStream<A> |
ifNotExists(Class<B> otherClass,
BiJoiner<A,B>... joiners)
As defined by
ifNotExists(Class, BiJoiner) . |
default <B> UniConstraintStream<A> |
ifNotExists(Class<B> otherClass,
BiJoiner<A,B> joiner)
Create a new
UniConstraintStream for every A where B does not exist for which the BiJoiner is
true (for the properties it extracts from both facts). |
default <B> UniConstraintStream<A> |
ifNotExists(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2)
As defined by
ifNotExists(Class, BiJoiner) . |
default <B> UniConstraintStream<A> |
ifNotExists(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2,
BiJoiner<A,B> joiner3)
As defined by
ifNotExists(Class, BiJoiner) . |
default <B> UniConstraintStream<A> |
ifNotExists(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2,
BiJoiner<A,B> joiner3,
BiJoiner<A,B> joiner4)
As defined by
ifNotExists(Class, BiJoiner) . |
default UniConstraintStream<A> |
ifNotExistsOther(Class<A> otherClass)
Create a new
UniConstraintStream for every A, if no other A exists that does not #equals(Object)
the first. |
default UniConstraintStream<A> |
ifNotExistsOther(Class<A> otherClass,
BiJoiner<A,A>... joiners)
As defined by
ifNotExistsOther(Class, BiJoiner) . |
default UniConstraintStream<A> |
ifNotExistsOther(Class<A> otherClass,
BiJoiner<A,A> joiner)
Create a new
UniConstraintStream for every A, if no other A exists that does not #equals(Object)
the first, and for which the BiJoiner is true (for the properties it extracts from both facts). |
default UniConstraintStream<A> |
ifNotExistsOther(Class<A> otherClass,
BiJoiner<A,A> joiner1,
BiJoiner<A,A> joiner2)
As defined by
ifNotExistsOther(Class, BiJoiner) . |
default UniConstraintStream<A> |
ifNotExistsOther(Class<A> otherClass,
BiJoiner<A,A> joiner1,
BiJoiner<A,A> joiner2,
BiJoiner<A,A> joiner3)
As defined by
ifNotExistsOther(Class, BiJoiner) . |
default UniConstraintStream<A> |
ifNotExistsOther(Class<A> otherClass,
BiJoiner<A,A> joiner1,
BiJoiner<A,A> joiner2,
BiJoiner<A,A> joiner3,
BiJoiner<A,A> joiner4)
As defined by
ifNotExistsOther(Class, BiJoiner) . |
default <B> BiConstraintStream<A,B> |
join(Class<B> otherClass)
Create a new
BiConstraintStream for every combination of A and B. |
default <B> BiConstraintStream<A,B> |
join(Class<B> otherClass,
BiJoiner<A,B>... joiners)
As defined by
join(Class, BiJoiner) . |
default <B> BiConstraintStream<A,B> |
join(Class<B> otherClass,
BiJoiner<A,B> joiner)
Create a new
BiConstraintStream for every combination of A and B
for which the BiJoiner is true (for the properties it extracts from both facts). |
default <B> BiConstraintStream<A,B> |
join(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2)
As defined by
join(Class, BiJoiner) . |
default <B> BiConstraintStream<A,B> |
join(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2,
BiJoiner<A,B> joiner3)
As defined by
join(Class, BiJoiner) . |
default <B> BiConstraintStream<A,B> |
join(Class<B> otherClass,
BiJoiner<A,B> joiner1,
BiJoiner<A,B> joiner2,
BiJoiner<A,B> joiner3,
BiJoiner<A,B> joiner4)
As defined by
join(Class, BiJoiner) . |
default <B> BiConstraintStream<A,B> |
join(UniConstraintStream<B> otherStream)
Create a new
BiConstraintStream for every combination of A and B. |
<B> BiConstraintStream<A,B> |
join(UniConstraintStream<B> otherStream,
BiJoiner<A,B> joiner)
Create a new
BiConstraintStream for every combination of A and B for which the BiJoiner
is true (for the properties it extracts from both facts). |
default Constraint |
penalize(String constraintName,
Score<?> constraintWeight,
ToIntFunction<A> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalize(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntFunction<A> matchWeigher)
As defined by
penalize(String, Score, ToIntFunction) . |
default Constraint |
penalizeBigDecimal(String constraintName,
Score<?> constraintWeight,
Function<A,BigDecimal> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
Function<A,BigDecimal> matchWeigher)
As defined by
penalizeBigDecimal(String, Score, Function) . |
Constraint |
penalizeConfigurable(String constraintPackage,
String constraintName,
ToIntFunction<A> matchWeigher)
As defined by
penalizeConfigurable(String, ToIntFunction) . |
default Constraint |
penalizeConfigurable(String constraintName,
ToIntFunction<A> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeConfigurableBigDecimal(String constraintName,
Function<A,BigDecimal> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
Constraint |
penalizeConfigurableBigDecimal(String constraintPackage,
String constraintName,
Function<A,BigDecimal> matchWeigher)
As defined by
penalizeConfigurableBigDecimal(String, Function) . |
Constraint |
penalizeConfigurableLong(String constraintPackage,
String constraintName,
ToLongFunction<A> matchWeigher)
As defined by
penalizeConfigurableLong(String, ToLongFunction) . |
default Constraint |
penalizeConfigurableLong(String constraintName,
ToLongFunction<A> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeLong(String constraintName,
Score<?> constraintWeight,
ToLongFunction<A> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongFunction<A> matchWeigher)
As defined by
penalizeLong(String, Score, ToLongFunction) . |
default Constraint |
reward(String constraintName,
Score<?> constraintWeight,
ToIntFunction<A> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
reward(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntFunction<A> matchWeigher)
As defined by
reward(String, Score, ToIntFunction) . |
default Constraint |
rewardBigDecimal(String constraintName,
Score<?> constraintWeight,
Function<A,BigDecimal> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
rewardBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
Function<A,BigDecimal> matchWeigher)
As defined by
rewardBigDecimal(String, Score, Function) . |
Constraint |
rewardConfigurable(String constraintPackage,
String constraintName,
ToIntFunction<A> matchWeigher)
As defined by
rewardConfigurable(String, ToIntFunction) . |
default Constraint |
rewardConfigurable(String constraintName,
ToIntFunction<A> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardConfigurableBigDecimal(String constraintName,
Function<A,BigDecimal> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
Constraint |
rewardConfigurableBigDecimal(String constraintPackage,
String constraintName,
Function<A,BigDecimal> matchWeigher)
As defined by
rewardConfigurableBigDecimal(String, Function) . |
Constraint |
rewardConfigurableLong(String constraintPackage,
String constraintName,
ToLongFunction<A> matchWeigher)
As defined by
rewardConfigurableLong(String, ToLongFunction) . |
default Constraint |
rewardConfigurableLong(String constraintName,
ToLongFunction<A> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardLong(String constraintName,
Score<?> constraintWeight,
ToLongFunction<A> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
rewardLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongFunction<A> matchWeigher)
As defined by
rewardLong(String, Score, ToLongFunction) . |
getConstraintFactory, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
UniConstraintStream<A> filter(Predicate<A> predicate)
Predicate
and match if Predicate.test(Object)
returns true.predicate
- never nulldefault <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream)
BiConstraintStream
for every combination of A and B.
Important: Filtering
this is slower and less scalable
than a join(UniConstraintStream, BiJoiner)
,
because it doesn't apply hashing and/or indexing on the properties,
so it creates and checks every combination of A and B.
B
- the type of the second matched factotherStream
- never null<B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, BiJoiner<A,B> joiner)
BiConstraintStream
for every combination of A and B for which the BiJoiner
is true (for the properties it extracts from both facts).
Important: This is faster and more scalable than a join
followed by a filter
,
because it applies hashing and/or indexing on the properties,
so it doesn't create nor checks every combination of A and B.
B
- the type of the second matched factotherStream
- never nulljoiner
- never nullBiJoiner
is truedefault <B> BiConstraintStream<A,B> join(Class<B> otherClass)
BiConstraintStream
for every combination of A and B.
Important: Filtering
this is slower and less scalable
than a join(Class, BiJoiner)
,
because it doesn't apply hashing and/or indexing on the properties,
so it creates and checks every combination of A and B.
This method is syntactic sugar for join(UniConstraintStream)
.
B
- the type of the second matched factotherClass
- never nulldefault <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A,B> joiner)
BiConstraintStream
for every combination of A and B
for which the BiJoiner
is true (for the properties it extracts from both facts).
Important: This is faster and more scalable than a join
followed by a filter
,
because it applies hashing and/or indexing on the properties,
so it doesn't create nor checks every combination of A and B.
This method is syntactic sugar for join(UniConstraintStream, BiJoiner)
.
This method has overloaded methods with multiple BiJoiner
parameters.
B
- the type of the second matched factotherClass
- never nulljoiner
- never nullBiJoiner
is truedefault <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2)
join(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed before
filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiners
are truedefault <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2, BiJoiner<A,B> joiner3)
join(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed before
filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiners
are truedefault <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2, BiJoiner<A,B> joiner3, BiJoiner<A,B> joiner4)
join(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed before
filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiner4
- never nulljoiners
are truedefault <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A,B>... joiners)
join(Class, BiJoiner)
. If multiple BiJoiner
s are provided, for performance
reasons, the indexing joiners must be placed before filtering joiners.
This method causes Unchecked generics array creation for varargs parameter warnings,
but we can't fix it with a SafeVarargs
annotation because it's an interface method.
Therefore, there are overloaded methods with up to 4 BiJoiner
parameters.
B
- the type of the second matched factotherClass
- never nulljoiners
- never nulljoiners
are truedefault <B> UniConstraintStream<A> ifExists(Class<B> otherClass, BiJoiner<A,B> joiner)
UniConstraintStream
for every A where B exists for which the BiJoiner
is true
(for the properties it extracts from both facts).
This method has overloaded methods with multiple BiJoiner
parameters.
B
- the type of the second matched factotherClass
- never nulljoiner
- never nullBiJoiner
is truedefault <B> UniConstraintStream<A> ifExists(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2)
ifExists(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed before
filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nullBiJoiner
s are truedefault <B> UniConstraintStream<A> ifExists(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2, BiJoiner<A,B> joiner3)
ifExists(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed before
filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nullBiJoiner
s are truedefault <B> UniConstraintStream<A> ifExists(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2, BiJoiner<A,B> joiner3, BiJoiner<A,B> joiner4)
ifExists(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed before
filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiner4
- never nullBiJoiner
s are true<B> UniConstraintStream<A> ifExists(Class<B> otherClass, BiJoiner<A,B>... joiners)
ifExists(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed before
filtering joiners.
This method causes Unchecked generics array creation for varargs parameter warnings,
but we can't fix it with a SafeVarargs
annotation because it's an interface method.
Therefore, there are overloaded methods with up to 4 BiJoiner
parameters.
B
- the type of the second matched factotherClass
- never nulljoiners
- never nullBiJoiner
s are truedefault UniConstraintStream<A> ifExistsOther(Class<A> otherClass)
UniConstraintStream
for every A, if another A exists that does not #equals(Object)
the first.otherClass
- never nulldefault UniConstraintStream<A> ifExistsOther(Class<A> otherClass, BiJoiner<A,A> joiner)
UniConstraintStream
for every A, if another A exists that does not #equals(Object)
the first, and for which the BiJoiner
is true (for the properties it extracts from both facts).
This method has overloaded methods with multiple BiJoiner
parameters.
otherClass
- never nulljoiner
- never nullBiJoiner
is
truedefault UniConstraintStream<A> ifExistsOther(Class<A> otherClass, BiJoiner<A,A> joiner1, BiJoiner<A,A> joiner2)
ifExistsOther(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.otherClass
- never nulljoiner1
- never nulljoiner2
- never nullBiJoiner
s
are truedefault UniConstraintStream<A> ifExistsOther(Class<A> otherClass, BiJoiner<A,A> joiner1, BiJoiner<A,A> joiner2, BiJoiner<A,A> joiner3)
ifExistsOther(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.otherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nullBiJoiner
s
are truedefault UniConstraintStream<A> ifExistsOther(Class<A> otherClass, BiJoiner<A,A> joiner1, BiJoiner<A,A> joiner2, BiJoiner<A,A> joiner3, BiJoiner<A,A> joiner4)
ifExistsOther(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.otherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiner4
- never nullBiJoiner
s
are truedefault UniConstraintStream<A> ifExistsOther(Class<A> otherClass, BiJoiner<A,A>... joiners)
ifExistsOther(Class, BiJoiner)
. If multiple BiJoiner
s are provided,
for performance reasons, the indexing joiners must be placed before filtering joiners.
This method causes Unchecked generics array creation for varargs parameter warnings,
but we can't fix it with a SafeVarargs
annotation because it's an interface method.
Therefore, there are overloaded methods with up to 4 BiJoiner
parameters.
otherClass
- never nulljoiners
- never nullBiJoiner
s
are truedefault <B> UniConstraintStream<A> ifNotExists(Class<B> otherClass, BiJoiner<A,B> joiner)
UniConstraintStream
for every A where B does not exist for which the BiJoiner
is
true (for the properties it extracts from both facts).
This method has overloaded methods with multiple BiJoiner
parameters.
B
- the type of the second matched factotherClass
- never nulljoiner
- never nullBiJoiner
is truedefault <B> UniConstraintStream<A> ifNotExists(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2)
ifNotExists(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nullBiJoiner
s are
truedefault <B> UniConstraintStream<A> ifNotExists(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2, BiJoiner<A,B> joiner3)
ifNotExists(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nullBiJoiner
s are
truedefault <B> UniConstraintStream<A> ifNotExists(Class<B> otherClass, BiJoiner<A,B> joiner1, BiJoiner<A,B> joiner2, BiJoiner<A,B> joiner3, BiJoiner<A,B> joiner4)
ifNotExists(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.B
- the type of the second matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiner4
- never nullBiJoiner
s are
true<B> UniConstraintStream<A> ifNotExists(Class<B> otherClass, BiJoiner<A,B>... joiners)
ifNotExists(Class, BiJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.
This method causes Unchecked generics array creation for varargs parameter warnings,
but we can't fix it with a SafeVarargs
annotation because it's an interface method.
Therefore, there are overloaded methods with up to 4 BiJoiner
parameters.
B
- the type of the second matched factotherClass
- never nulljoiners
- never nullBiJoiner
s are
truedefault UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass)
UniConstraintStream
for every A, if no other A exists that does not #equals(Object)
the first.otherClass
- never nulldefault UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass, BiJoiner<A,A> joiner)
UniConstraintStream
for every A, if no other A exists that does not #equals(Object)
the first, and for which the BiJoiner
is true (for the properties it extracts from both facts).
This method has overloaded methods with multiple BiJoiner
parameters.
otherClass
- never nulljoiner
- never nullBiJoiner
is truedefault UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass, BiJoiner<A,A> joiner1, BiJoiner<A,A> joiner2)
ifNotExistsOther(Class, BiJoiner)
. For performance reasons, indexing joiners must be
placed before filtering joiners.otherClass
- never nulljoiner1
- never nulljoiner2
- never nullBiJoiner
s are truedefault UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass, BiJoiner<A,A> joiner1, BiJoiner<A,A> joiner2, BiJoiner<A,A> joiner3)
ifNotExistsOther(Class, BiJoiner)
. For performance reasons, indexing joiners must be
placed before filtering joiners.otherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nullBiJoiner
s are truedefault UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass, BiJoiner<A,A> joiner1, BiJoiner<A,A> joiner2, BiJoiner<A,A> joiner3, BiJoiner<A,A> joiner4)
ifNotExistsOther(Class, BiJoiner)
. For performance reasons, indexing joiners must be
placed before filtering joiners.otherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiner4
- never nullBiJoiner
s are truedefault UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass, BiJoiner<A,A>... joiners)
ifNotExistsOther(Class, BiJoiner)
. If multiple BiJoiner
s are provided, for
performance reasons, the indexing joiners must be placed before filtering joiners.
This method causes Unchecked generics array creation for varargs parameter warnings,
but we can't fix it with a SafeVarargs
annotation because it's an interface method.
Therefore, there are overloaded methods with up to 4 BiJoiner
parameters.
otherClass
- never nulljoiners
- never nullBiJoiner
s are true<ResultContainer_,Result_> UniConstraintStream<Result_> groupBy(UniConstraintCollector<A,ResultContainer_,Result_> collector)
UniConstraintStream
to a different UniConstraintStream
, containing only a single
tuple, the result of applying UniConstraintCollector
.ResultContainer_
- the mutable accumulation type (often hidden as an implementation detail)Result_
- the type of a fact in the destination UniConstraintStream
's tuplecollector
- never null, the collector to perform the grouping operation with<GroupKey_> UniConstraintStream<GroupKey_> groupBy(Function<A,GroupKey_> groupKeyMapping)
UniConstraintStream
to a different UniConstraintStream
, containing the set of tuples
resulting from applying the group key mapping function on all tuples of the original stream.
Neither tuple of the new stream Objects.equals(Object, Object)
any other.GroupKey_
- the type of a fact in the destination UniConstraintStream
's tuplegroupKeyMapping
- never null, mapping function to convert each element in the stream to a different element<GroupKey_,ResultContainer_,Result_> BiConstraintStream<GroupKey_,Result_> groupBy(Function<A,GroupKey_> groupKeyMapping, UniConstraintCollector<A,ResultContainer_,Result_> collector)
UniConstraintStream
to a BiConstraintStream
, consisting of unique tuples with two
facts.
The first fact is the return value of the first group key mapping function, applied on the incoming tuple.
The second fact is the return value of a given UniConstraintCollector
applied on all incoming tuples with
the same first fact.
GroupKey_
- the type of the first fact in the destination BiConstraintStream
's tupleResultContainer_
- the mutable accumulation type (often hidden as an implementation detail)Result_
- the type of the second fact in the destination BiConstraintStream
's tuplegroupKeyMapping
- never null, function to convert the fact in the original tuple to a different fact<GroupKeyA_,GroupKeyB_> BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(Function<A,GroupKeyA_> groupKeyAMapping, Function<A,GroupKeyB_> groupKeyBMapping)
UniConstraintStream
to a BiConstraintStream
, consisting of unique tuples with two
facts.
The first fact is the return value of the first group key mapping function, applied on the incoming tuple. The second fact is the return value of the second group key mapping function, applied on all incoming tuples with the same first fact.
GroupKeyA_
- the type of the first fact in the destination BiConstraintStream
's tupleGroupKeyB_
- the type of the second fact in the destination BiConstraintStream
's tuplegroupKeyAMapping
- never null, function to convert the original tuple into a first factgroupKeyBMapping
- never null, function to convert the original tuple into a second fact<GroupKeyA_,GroupKeyB_,ResultContainer_,Result_> TriConstraintStream<GroupKeyA_,GroupKeyB_,Result_> groupBy(Function<A,GroupKeyA_> groupKeyAMapping, Function<A,GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A,ResultContainer_,Result_> collector)
groupBy(Function, Function)
and groupBy(UniConstraintCollector)
.
That is, the first and second facts in the tuple follow the groupBy(Function, Function)
semantics, and
the third fact is the result of applying UniConstraintCollector.finisher()
on all the tuples of the
original UniConstraintStream
that belong to the group.GroupKeyA_
- the type of the first fact in the destination TriConstraintStream
's tupleGroupKeyB_
- the type of the second fact in the destination TriConstraintStream
's tupleResultContainer_
- the mutable accumulation type (often hidden as an implementation detail)Result_
- the type of the third fact in the destination TriConstraintStream
's tuplegroupKeyAMapping
- never null, function to convert the original tuple into a first factgroupKeyBMapping
- never null, function to convert the original tuple into a second factcollector
- never null, the collector to perform the grouping operation with<GroupKeyA_,GroupKeyB_,ResultContainerC_,ResultC_,ResultContainerD_,ResultD_> QuadConstraintStream<GroupKeyA_,GroupKeyB_,ResultC_,ResultD_> groupBy(Function<A,GroupKeyA_> groupKeyAMapping, Function<A,GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A,ResultContainerC_,ResultC_> collectorC, UniConstraintCollector<A,ResultContainerD_,ResultD_> collectorD)
groupBy(Function, Function)
and groupBy(UniConstraintCollector)
.
That is, the first and second facts in the tuple follow the groupBy(Function, Function)
semantics.
The third fact is the result of applying the first UniConstraintCollector.finisher()
on all the tuples
of the original UniConstraintStream
that belong to the group.
The fourth fact is the result of applying the second UniConstraintCollector.finisher()
on all the tuples
of the original UniConstraintStream
that belong to the groupGroupKeyA_
- the type of the first fact in the destination QuadConstraintStream
's tupleGroupKeyB_
- the type of the second fact in the destination QuadConstraintStream
's tupleResultContainerC_
- the mutable accumulation type (often hidden as an implementation detail)ResultC_
- the type of the third fact in the destination QuadConstraintStream
's tupleResultContainerD_
- the mutable accumulation type (often hidden as an implementation detail)ResultD_
- the type of the fourth fact in the destination QuadConstraintStream
's tuplegroupKeyAMapping
- never null, function to convert the original tuple into a first factgroupKeyBMapping
- never null, function to convert the original tuple into a second factcollectorC
- never null, the collector to perform the first grouping operation withcollectorD
- never null, the collector to perform the first grouping operation withdefault Constraint penalize(String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
Score
: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score)
.
For non-int Score
types use penalizeLong(String, Score, ToLongFunction)
or
penalizeBigDecimal(String, Score, Function)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
penalize(String, Score, ToIntFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeLong(String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
Score
: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
penalizeLong(String, Score, ToLongFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeBigDecimal(String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
Score
: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
penalizeBigDecimal(String, Score, Function)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurable(String constraintName, ToIntFunction<A> matchWeigher)
Score
: subtract the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String)
.
For non-int Score
types use penalizeConfigurableLong(String, ToLongFunction)
or
penalizeConfigurableBigDecimal(String, Function)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher)
penalizeConfigurable(String, ToIntFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurableLong(String constraintName, ToLongFunction<A> matchWeigher)
Score
: subtract the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher)
penalizeConfigurableLong(String, ToLongFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurableBigDecimal(String constraintName, Function<A,BigDecimal> matchWeigher)
Score
: subtract the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher)
penalizeConfigurableBigDecimal(String, Function)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint reward(String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
Score
: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score)
.
For non-int Score
types use rewardLong(String, Score, ToLongFunction)
or
rewardBigDecimal(String, Score, Function)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
reward(String, Score, ToIntFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardLong(String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
Score
: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
rewardLong(String, Score, ToLongFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardBigDecimal(String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
Score
: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
rewardBigDecimal(String, Score, Function)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurable(String constraintName, ToIntFunction<A> matchWeigher)
Score
: add the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String)
.
For non-int Score
types use rewardConfigurableLong(String, ToLongFunction)
or
rewardConfigurableBigDecimal(String, Function)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher)
rewardConfigurable(String, ToIntFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurableLong(String constraintName, ToLongFunction<A> matchWeigher)
Score
: add the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher)
rewardConfigurableLong(String, ToLongFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurableBigDecimal(String constraintName, Function<A,BigDecimal> matchWeigher)
Score
: add the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher)
rewardConfigurableBigDecimal(String, Function)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullCopyright © 2006–2020 JBoss by Red Hat. All rights reserved.