Class Joiners
- java.lang.Object
-
- org.optaplanner.core.api.score.stream.Joiners
-
public final class Joiners extends Object
Creates anBiJoiner
,TriJoiner
, ... instance for use inUniConstraintStream.join(Class, BiJoiner)
, ...
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A> BiJoiner<A,A>
equal()
Joins every A and B that are equal.static <A,B,C,Property_>
TriJoiner<A,B,C>equal(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C that share a property.static <A,Property_>
BiJoiner<A,A>equal(Function<A,Property_> mapping)
Joins every A and B that share a property.static <A,B,Property_>
BiJoiner<A,B>equal(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B that share a property.static <A,B,C,D,E,Property_>
PentaJoiner<A,B,C,D,E>equal(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E that share a property.static <A,B,C,D,Property_>
QuadJoiner<A,B,C,D>equal(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D that share a property.static <A,B>
BiJoiner<A,B>filtering(BiPredicate<A,B> filter)
Applies a filter to the joined tuple, with the semantics ofBiConstraintStream.filter(BiPredicate)
.static <A,B,C,D,E>
PentaJoiner<A,B,C,D,E>filtering(PentaPredicate<A,B,C,D,E> filter)
static <A,B,C,D>
QuadJoiner<A,B,C,D>filtering(QuadPredicate<A,B,C,D> filter)
Applies a filter to the joined tuple (A,B,C,D), with the semantics ofQuadConstraintStream.filter(QuadPredicate)
.static <A,B,C>
TriJoiner<A,B,C>filtering(TriPredicate<A,B,C> filter)
Applies a filter to the joined tuple (A,B,C), with the semantics ofTriConstraintStream.filter(TriPredicate)
.static <A,B,C,Property_ extends Comparable<Property_>>
TriJoiner<A,B,C>greaterThan(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C where a value of property of (A,B) is greater than the value of a property of C.static <A,Property_ extends Comparable<Property_>>
BiJoiner<A,A>greaterThan(Function<A,Property_> mapping)
Joins every A and B where a value of property on A is greater than the value of the same property on B.static <A,B,Property_ extends Comparable<Property_>>
BiJoiner<A,B>greaterThan(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B where a value of property on A is greater than the value of a property on B.static <A,B,C,D,E,Property_ extends Comparable<Property_>>
PentaJoiner<A,B,C,D,E>greaterThan(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E where a value of property of (A,B,C,D) is greater than the value of a property of E.static <A,B,C,D,Property_ extends Comparable<Property_>>
QuadJoiner<A,B,C,D>greaterThan(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D where a value of property of (A,B,C) is greater than the value of a property of D.static <A,B,C,Property_ extends Comparable<Property_>>
TriJoiner<A,B,C>greaterThanOrEqual(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C where a value of property of (A,B) is greater than or equal to the value of a property of C.static <A,Property_ extends Comparable<Property_>>
BiJoiner<A,A>greaterThanOrEqual(Function<A,Property_> mapping)
Joins every A and B where a value of property on A is greater than or equal to the value of the same property on B.static <A,B,Property_ extends Comparable<Property_>>
BiJoiner<A,B>greaterThanOrEqual(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B where a value of property on A is greater than or equal to the value of a property on B.static <A,B,C,D,E,Property_ extends Comparable<Property_>>
PentaJoiner<A,B,C,D,E>greaterThanOrEqual(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E where a value of property of (A,B,C,D) is greater than or equal to the value of a property of E.static <A,B,C,D,Property_ extends Comparable<Property_>>
QuadJoiner<A,B,C,D>greaterThanOrEqual(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D where a value of property of (A,B,C) is greater than or equal to the value of a property of D.static <A,B,C,Property_ extends Comparable<Property_>>
TriJoiner<A,B,C>lessThan(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C where a value of property of (A,B) is less than the value of a property of C.static <A,Property_ extends Comparable<Property_>>
BiJoiner<A,A>lessThan(Function<A,Property_> mapping)
Joins every A and B where a value of property on A is less than the value of the same property on B.static <A,B,Property_ extends Comparable<Property_>>
BiJoiner<A,B>lessThan(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B where a value of property on A is less than the value of a property on B.static <A,B,C,D,E,Property_ extends Comparable<Property_>>
PentaJoiner<A,B,C,D,E>lessThan(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E where a value of property of (A,B,C,D) is less than the value of a property of E.static <A,B,C,D,Property_ extends Comparable<Property_>>
QuadJoiner<A,B,C,D>lessThan(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D where a value of property of (A,B,C) is less than the value of a property of D.static <A,B,C,Property_ extends Comparable<Property_>>
TriJoiner<A,B,C>lessThanOrEqual(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C where a value of property of (A,B) is less than or equal to the value of a property of C.static <A,Property_ extends Comparable<Property_>>
BiJoiner<A,A>lessThanOrEqual(Function<A,Property_> mapping)
Joins every A and B where a value of property on A is less than or equal to the value of the same property on B.static <A,B,Property_ extends Comparable<Property_>>
BiJoiner<A,B>lessThanOrEqual(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B where a value of property on A is less than or equal to the value of a property on B.static <A,B,C,D,E,Property_ extends Comparable<Property_>>
PentaJoiner<A,B,C,D,E>lessThanOrEqual(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E where a value of property of (A,B,C,D) is less than or equal to the value of a property of E.static <A,B,C,D,Property_ extends Comparable<Property_>>
QuadJoiner<A,B,C,D>lessThanOrEqual(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D where a value of property of (A,B,C) is less than or equal to the value of a property of D.static <A,B,C,Property_ extends Comparable<Property_>>
TriJoiner<A,B,C>overlapping(BiFunction<A,B,Property_> leftStartMapping, BiFunction<A,B,Property_> leftEndMapping, Function<C,Property_> rightStartMapping, Function<C,Property_> rightEndMapping)
As defined byoverlapping(Function, Function)
.static <A,Property_ extends Comparable<Property_>>
BiJoiner<A,A>overlapping(Function<A,Property_> startMapping, Function<A,Property_> endMapping)
Joins every A and B that overlap for an interval which is specified by a start and end property on both A and B.static <A,B,Property_ extends Comparable<Property_>>
BiJoiner<A,B>overlapping(Function<A,Property_> leftStartMapping, Function<A,Property_> leftEndMapping, Function<B,Property_> rightStartMapping, Function<B,Property_> rightEndMapping)
As defined byoverlapping(Function, Function)
.static <A,B,C,D,E,Property_ extends Comparable<Property_>>
PentaJoiner<A,B,C,D,E>overlapping(QuadFunction<A,B,C,D,Property_> leftStartMapping, QuadFunction<A,B,C,D,Property_> leftEndMapping, Function<E,Property_> rightStartMapping, Function<E,Property_> rightEndMapping)
As defined byoverlapping(Function, Function)
.static <A,B,C,D,Property_ extends Comparable<Property_>>
QuadJoiner<A,B,C,D>overlapping(TriFunction<A,B,C,Property_> leftStartMapping, TriFunction<A,B,C,Property_> leftEndMapping, Function<D,Property_> rightStartMapping, Function<D,Property_> rightEndMapping)
As defined byoverlapping(Function, Function)
.
-
-
-
Method Detail
-
equal
public static <A> BiJoiner<A,A> equal()
Joins every A and B that are equal. Delegates toequal(Function)
withFunction.identity()
as the argument.- Type Parameters:
A
- the type of both objects- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where A and B are equal
-
equal
public static <A,Property_> BiJoiner<A,A> equal(Function<A,Property_> mapping)
Joins every A and B that share a property. These are exactly the pairs wheremapping.apply(A).equals(mapping.apply(B))
. Delegates toequal(Function, Function)
with both arguments using the same mapping.- Type Parameters:
A
- the type of both objectsProperty_
- the type of the property to compare- Parameters:
mapping
- mapping function to apply to both A and B- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where the same property of A and B is equal
-
equal
public static <A,B,Property_> BiJoiner<A,B> equal(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B that share a property. These are exactly the pairs whereleftMapping.apply(A).equals(rightMapping.apply(B))
.- Type Parameters:
A
- the type of object on the leftB
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to ArightMapping
- mapping function to apply to B- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A equals that of B
-
lessThan
public static <A,Property_ extends Comparable<Property_>> BiJoiner<A,A> lessThan(Function<A,Property_> mapping)
Joins every A and B where a value of property on A is less than the value of the same property on B. These are exactly the pairs wheremapping.apply(A).compareTo(mapping.apply(B)) < 0
. Delegates tolessThan(Function, Function)
with both arguments using the same mapping.- Type Parameters:
A
- the type of both objectsProperty_
- the type of the property to compare- Parameters:
mapping
- mapping function to apply- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A is less than that of B
-
lessThan
public static <A,B,Property_ extends Comparable<Property_>> BiJoiner<A,B> lessThan(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B where a value of property on A is less than the value of a property on B. These are exactly the pairs whereleftMapping.apply(A).compareTo(rightMapping.apply(B)) < 0
.- Type Parameters:
A
- the type of object on the leftB
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to ArightMapping
- mapping function to apply to B- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A is less than a property of B
-
lessThanOrEqual
public static <A,Property_ extends Comparable<Property_>> BiJoiner<A,A> lessThanOrEqual(Function<A,Property_> mapping)
Joins every A and B where a value of property on A is less than or equal to the value of the same property on B. These are exactly the pairs wheremapping.apply(A).compareTo(mapping.apply(B)) <= 0
. Delegates tolessThanOrEqual(Function, Function)
with both arguments using the same mapping.- Type Parameters:
A
- the type of both objectsProperty_
- the type of the property to compare- Parameters:
mapping
- mapping function to apply- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A is less than or equal to that of B
-
lessThanOrEqual
public static <A,B,Property_ extends Comparable<Property_>> BiJoiner<A,B> lessThanOrEqual(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B where a value of property on A is less than or equal to the value of a property on B. These are exactly the pairs whereleftMapping.apply(A).compareTo(rightMapping.apply(B)) <= 0
.- Type Parameters:
A
- the type of object on the leftB
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to ArightMapping
- mapping function to apply to B- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A is less than or equal to a property of B
-
greaterThan
public static <A,Property_ extends Comparable<Property_>> BiJoiner<A,A> greaterThan(Function<A,Property_> mapping)
Joins every A and B where a value of property on A is greater than the value of the same property on B. These are exactly the pairs wheremapping.apply(A).compareTo(mapping.apply(B)) > 0
. Delegates togreaterThan(Function, Function)
with both arguments using the same mapping.- Type Parameters:
A
- the type of both objectsProperty_
- the type of the property to compare- Parameters:
mapping
- mapping function to apply- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A is greater than that of B
-
greaterThan
public static <A,B,Property_ extends Comparable<Property_>> BiJoiner<A,B> greaterThan(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B where a value of property on A is greater than the value of a property on B. These are exactly the pairs whereleftMapping.apply(A).compareTo(rightMapping.apply(B)) > 0
.- Type Parameters:
A
- the type of object on the leftB
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to ArightMapping
- mapping function to apply to B- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A is greater than a property of B
-
greaterThanOrEqual
public static <A,Property_ extends Comparable<Property_>> BiJoiner<A,A> greaterThanOrEqual(Function<A,Property_> mapping)
Joins every A and B where a value of property on A is greater than or equal to the value of the same property on B. These are exactly the pairs wheremapping.apply(A).compareTo(mapping.apply(B)) >= 0
. Delegates togreaterThanOrEqual(Function, Function)
with both arguments using the same mapping.- Type Parameters:
A
- the type of both objectsProperty_
- the type of the property to compare- Parameters:
mapping
- mapping function to apply- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A is greater than or equal to that of B
-
greaterThanOrEqual
public static <A,B,Property_ extends Comparable<Property_>> BiJoiner<A,B> greaterThanOrEqual(Function<A,Property_> leftMapping, Function<B,Property_> rightMapping)
Joins every A and B where a value of property on A is greater than or equal to the value of a property on B. These are exactly the pairs whereleftMapping.apply(A).compareTo(rightMapping.apply(B)) >= 0
.- Type Parameters:
A
- the type of object on the leftB
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to ArightMapping
- mapping function to apply to B- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where a property of A is greater than or equal to a property of B
-
filtering
public static <A,B> BiJoiner<A,B> filtering(BiPredicate<A,B> filter)
Applies a filter to the joined tuple, with the semantics ofBiConstraintStream.filter(BiPredicate)
.- Type Parameters:
A
- type of the first fact in the tupleB
- type of the second fact in the tuple- Parameters:
filter
- never null, filter to apply- Returns:
- never null
-
overlapping
public static <A,Property_ extends Comparable<Property_>> BiJoiner<A,A> overlapping(Function<A,Property_> startMapping, Function<A,Property_> endMapping)
Joins every A and B that overlap for an interval which is specified by a start and end property on both A and B. These are exactly the pairs whereA.start < B.end
andA.end > B.start
.- Type Parameters:
A
- the type of both the first and second argumentProperty_
- the type used to define the interval, comparable- Parameters:
startMapping
- maps the argument to the start point of its interval (inclusive)endMapping
- maps the argument to the end point of its interval (exclusive)- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where A's and B's intervals (as defined by the function mapping) overlap
-
overlapping
public static <A,B,Property_ extends Comparable<Property_>> BiJoiner<A,B> overlapping(Function<A,Property_> leftStartMapping, Function<A,Property_> leftEndMapping, Function<B,Property_> rightStartMapping, Function<B,Property_> rightEndMapping)
As defined byoverlapping(Function, Function)
.- Type Parameters:
A
- the type of the first argumentB
- the type of the second argumentProperty_
- the type used to define the interval, comparable- Parameters:
leftStartMapping
- maps the first argument to its interval start point (inclusive)leftEndMapping
- maps the first argument to its interval end point (exclusive)rightStartMapping
- maps the second argument to its interval start point (inclusive)rightEndMapping
- maps the second argument to its interval end point (exclusive)- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B) where A's and B's intervals (as defined by the function mapping) overlap
-
equal
public static <A,B,C,Property_> TriJoiner<A,B,C> equal(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C that share a property. These are exactly the pairs whereleftMapping.apply(A, B).equals(rightMapping.apply(C))
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B)rightMapping
- mapping function to apply to C- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C) where a property of (A,B) equals that of C
-
lessThan
public static <A,B,C,Property_ extends Comparable<Property_>> TriJoiner<A,B,C> lessThan(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C where a value of property of (A,B) is less than the value of a property of C. These are exactly the pairs whereleftMapping.apply(A, B).compareTo(rightMapping.apply(C)) < 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B)rightMapping
- mapping function to apply to C- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C) where a property of (A,B) is less than a property of C
-
lessThanOrEqual
public static <A,B,C,Property_ extends Comparable<Property_>> TriJoiner<A,B,C> lessThanOrEqual(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C where a value of property of (A,B) is less than or equal to the value of a property of C. These are exactly the pairs whereleftMapping.apply(A, B).compareTo(rightMapping.apply(C)) <= 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B)rightMapping
- mapping function to apply to C- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C) where a property of (A,B) is less than or equal to a property of C
-
greaterThan
public static <A,B,C,Property_ extends Comparable<Property_>> TriJoiner<A,B,C> greaterThan(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C where a value of property of (A,B) is greater than the value of a property of C. These are exactly the pairs whereleftMapping.apply(A, B).compareTo(rightMapping.apply(C)) > 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B)rightMapping
- mapping function to apply to C- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C) where a property of (A,B) is greater than a property of C
-
greaterThanOrEqual
public static <A,B,C,Property_ extends Comparable<Property_>> TriJoiner<A,B,C> greaterThanOrEqual(BiFunction<A,B,Property_> leftMapping, Function<C,Property_> rightMapping)
Joins every (A,B) and C where a value of property of (A,B) is greater than or equal to the value of a property of C. These are exactly the pairs whereleftMapping.apply(A, B).compareTo(rightMapping.apply(C)) >= 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B)rightMapping
- mapping function to apply to C- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C) where a property of (A,B) is greater than or equal to a property of C
-
filtering
public static <A,B,C> TriJoiner<A,B,C> filtering(TriPredicate<A,B,C> filter)
Applies a filter to the joined tuple (A,B,C), with the semantics ofTriConstraintStream.filter(TriPredicate)
.- Type Parameters:
A
- type of the first fact in the tupleB
- type of the second fact in the tupleC
- type of the third fact in the tuple- Parameters:
filter
- never null, filter to apply- Returns:
- never null
-
overlapping
public static <A,B,C,Property_ extends Comparable<Property_>> TriJoiner<A,B,C> overlapping(BiFunction<A,B,Property_> leftStartMapping, BiFunction<A,B,Property_> leftEndMapping, Function<C,Property_> rightStartMapping, Function<C,Property_> rightEndMapping)
As defined byoverlapping(Function, Function)
.- Type Parameters:
A
- the type of the first argumentB
- the type of the second argumentC
- the type of the third argumentProperty_
- the type used to define the interval, comparable- Parameters:
leftStartMapping
- maps the first and second arguments to their interval start point (inclusive)leftEndMapping
- maps the first and second arguments to their interval end point (exclusive)rightStartMapping
- maps the third argument to its interval start point (inclusive)rightEndMapping
- maps the third argument to its interval end point (exclusive)- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C) where (A,B)'s and C's intervals (as defined by the function mapping) overlap
-
equal
public static <A,B,C,D,Property_> QuadJoiner<A,B,C,D> equal(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D that share a property. These are exactly the pairs whereleftMapping.apply(A, B, C).equals(rightMapping.apply(D))
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of the object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A, B, C)rightMapping
- mapping function to apply to D- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D) where a property of (A,B,C) equals that of D
-
lessThan
public static <A,B,C,D,Property_ extends Comparable<Property_>> QuadJoiner<A,B,C,D> lessThan(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D where a value of property of (A,B,C) is less than the value of a property of D. These are exactly the pairs whereleftMapping.apply(A, B, C).compareTo(rightMapping.apply(D)) < 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C)rightMapping
- mapping function to apply to D- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D) where a property of (A,B,C) is less than a property of D
-
lessThanOrEqual
public static <A,B,C,D,Property_ extends Comparable<Property_>> QuadJoiner<A,B,C,D> lessThanOrEqual(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D where a value of property of (A,B,C) is less than or equal to the value of a property of D. These are exactly the pairs whereleftMapping.apply(A, B, C).compareTo(rightMapping.apply(D)) <= 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C)rightMapping
- mapping function to apply to D- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D) where a property of (A,B,C) is less than or equal to a property of D
-
greaterThan
public static <A,B,C,D,Property_ extends Comparable<Property_>> QuadJoiner<A,B,C,D> greaterThan(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D where a value of property of (A,B,C) is greater than the value of a property of D. These are exactly the pairs whereleftMapping.apply(A, B, C).compareTo(rightMapping.apply(D)) > 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C)rightMapping
- mapping function to apply to D- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D) where a property of (A,B,C) is greater than a property of D
-
greaterThanOrEqual
public static <A,B,C,D,Property_ extends Comparable<Property_>> QuadJoiner<A,B,C,D> greaterThanOrEqual(TriFunction<A,B,C,Property_> leftMapping, Function<D,Property_> rightMapping)
Joins every (A,B,C) and D where a value of property of (A,B,C) is greater than or equal to the value of a property of D. These are exactly the pairs whereleftMapping.apply(A, B, C).compareTo(rightMapping.apply(D)) >= 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C)rightMapping
- mapping function to apply to D- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D) where a property of (A,B,C) is greater than or equal to a property of D
-
filtering
public static <A,B,C,D> QuadJoiner<A,B,C,D> filtering(QuadPredicate<A,B,C,D> filter)
Applies a filter to the joined tuple (A,B,C,D), with the semantics ofQuadConstraintStream.filter(QuadPredicate)
.- Type Parameters:
A
- type of the first fact in the tupleB
- type of the second fact in the tupleC
- type of the third fact in the tupleD
- type of the fourth fact in the tuple- Parameters:
filter
- never null, filter to apply- Returns:
- never null
-
overlapping
public static <A,B,C,D,Property_ extends Comparable<Property_>> QuadJoiner<A,B,C,D> overlapping(TriFunction<A,B,C,Property_> leftStartMapping, TriFunction<A,B,C,Property_> leftEndMapping, Function<D,Property_> rightStartMapping, Function<D,Property_> rightEndMapping)
As defined byoverlapping(Function, Function)
.- Type Parameters:
A
- the type of the first argumentB
- the type of the second argumentC
- the type of the third argumentD
- the type of the fourth argumentProperty_
- the type used to define the interval, comparable- Parameters:
leftStartMapping
- maps the first, second and third arguments to their interval start point (inclusive)leftEndMapping
- maps the first, second and third arguments to their interval end point (exclusive)rightStartMapping
- maps the fourth argument to its interval start point (inclusive)rightEndMapping
- maps the fourth argument to its interval end point (exclusive)- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D) where (A,B,C)'s and D's intervals (as defined by the function mapping) overlap
-
equal
public static <A,B,C,D,E,Property_> PentaJoiner<A,B,C,D,E> equal(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E that share a property. These are exactly the pairs whereleftMapping.apply(A, B, C, D).equals(rightMapping.apply(E))
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of the fourth object on the leftE
- the type of the object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C,D)rightMapping
- mapping function to apply to E- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D,E) where a property of (A,B,C,D) equals that of E
-
lessThan
public static <A,B,C,D,E,Property_ extends Comparable<Property_>> PentaJoiner<A,B,C,D,E> lessThan(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E where a value of property of (A,B,C,D) is less than the value of a property of E. These are exactly the pairs whereleftMapping.apply(A, B, C, D).compareTo(rightMapping.apply(E)) < 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of the fourth object on the leftE
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C,D)rightMapping
- mapping function to apply to E- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D,E) where a property of (A,B,C,D) is less than a property of E
-
lessThanOrEqual
public static <A,B,C,D,E,Property_ extends Comparable<Property_>> PentaJoiner<A,B,C,D,E> lessThanOrEqual(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E where a value of property of (A,B,C,D) is less than or equal to the value of a property of E. These are exactly the pairs whereleftMapping.apply(A, B, C, D).compareTo(rightMapping.apply(E)) <= 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of the fourth object on the leftE
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C,D)rightMapping
- mapping function to apply to E- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D,E) where a property of (A,B,C,D) is less than or equal to a property of E
-
greaterThan
public static <A,B,C,D,E,Property_ extends Comparable<Property_>> PentaJoiner<A,B,C,D,E> greaterThan(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E where a value of property of (A,B,C,D) is greater than the value of a property of E. These are exactly the pairs whereleftMapping.apply(A, B, C, D).compareTo(rightMapping.apply(E)) > 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of the fourth object on the leftE
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C,D)rightMapping
- mapping function to apply to E- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D,E) where a property of (A,B,C,D) is greater than a property of E
-
greaterThanOrEqual
public static <A,B,C,D,E,Property_ extends Comparable<Property_>> PentaJoiner<A,B,C,D,E> greaterThanOrEqual(QuadFunction<A,B,C,D,Property_> leftMapping, Function<E,Property_> rightMapping)
Joins every (A,B,C,D) and E where a value of property of (A,B,C,D) is greater than or equal to the value of a property of E. These are exactly the pairs whereleftMapping.apply(A, B, C, D).compareTo(rightMapping.apply(E)) >= 0
.- Type Parameters:
A
- the type of the first object on the leftB
- the type of the second object on the leftC
- the type of the third object on the leftD
- the type of the fourth object on the leftE
- the type of object on the rightProperty_
- the type of the property to compare- Parameters:
leftMapping
- mapping function to apply to (A,B,C,D)rightMapping
- mapping function to apply to E- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D,E) where a property of (A,B,C,D) is greater than or equal to a property of E
-
filtering
public static <A,B,C,D,E> PentaJoiner<A,B,C,D,E> filtering(PentaPredicate<A,B,C,D,E> filter)
-
overlapping
public static <A,B,C,D,E,Property_ extends Comparable<Property_>> PentaJoiner<A,B,C,D,E> overlapping(QuadFunction<A,B,C,D,Property_> leftStartMapping, QuadFunction<A,B,C,D,Property_> leftEndMapping, Function<E,Property_> rightStartMapping, Function<E,Property_> rightEndMapping)
As defined byoverlapping(Function, Function)
.- Type Parameters:
A
- the type of the first argumentB
- the type of the second argumentC
- the type of the third argumentD
- the type of the fourth argumentE
- the type of the fifth argumentProperty_
- the type used to define the interval, comparable- Parameters:
leftStartMapping
- maps the first, second, third and fourth arguments to their interval start point (inclusive)leftEndMapping
- maps the first, second, third and fourth arguments to their interval end point (exclusive)rightStartMapping
- maps the fifth argument to its interval start point (inclusive)rightEndMapping
- maps the fifth argument to its interval end point (exclusive)- Returns:
- never null, a joiner that filters the constraint stream to only include elements (A,B,C,D,E) where (A,B,C,D)'s and E's intervals (as defined by the function mapping) overlap
-
-