Class UnfinishedJoiners

java.lang.Object
ai.timefold.solver.core.impl.score.stream.UnfinishedJoiners

public final class UnfinishedJoiners extends Object
These joiners are not finished because they show score corruptions when used. We merged them anyway, as we will get back to them, but didn't want to have this relatively large PR open indefinitely. TODO once the joiners are finished, move them to Joiners and remove this class.
  • Constructor Details

    • UnfinishedJoiners

      public UnfinishedJoiners()
  • Method Details

    • containing

      public static <A, B, Property_> @NonNull BiJoiner<A,B> containing(@NonNull Function<A,Collection<Property_>> leftMapping, @NonNull Function<B,Property_> rightMapping)
      Joins every A and B where a value of property on B is contained in the collection of properties on A.

      For example:

      • ["A", "B"] containing "A" is true
      • ["A"] containing "A" is true
      • ["X", "Y"] containing "A" is false
      • [] containing "A" is false
      • ["A", "B"] containing null is false
      • [] containing null is false
      Type Parameters:
      A - the type of object on the left
      B - the type of object on the right
      Property_ - the type of the property to compare
      Parameters:
      leftMapping - mapping function to apply to A
      rightMapping - mapping function to apply to B
    • containedIn

      public static <A, B, Property_> @NonNull BiJoiner<A,B> containedIn(@NonNull Function<A,Property_> leftMapping, @NonNull Function<B,Collection<Property_>> rightMapping)
      Joins every A and B where a value of property on A is contained in the collection of properties on B.

      For example:

      • "A" contained in ["A", "B"] is true
      • "A" contained in ["A"] is true
      • "A" contained in ["X", "Y"] is false
      • "A" contained in [] is false
      • null contained in ["A", "B"] is false
      • null contained in [] is false
      Type Parameters:
      A - the type of object on the left
      B - the type of object on the right
      Property_ - the type of the property to compare
      Parameters:
      leftMapping - mapping function to apply to A
      rightMapping - mapping function to apply to B
    • containingAnyOf

      public static <A, Property_> @NonNull BiJoiner<A,A> containingAnyOf(@NonNull Function<A,Collection<Property_>> mapping)
      As defined by containingAnyOf(Function, Function) with both arguments using the same mapping.
      Type Parameters:
      A - the type of both objects
      Property_ - the type of the property to compare
      Parameters:
      mapping - mapping function to apply to both A and B
    • containingAnyOf

      public static <A, B, Property_> @NonNull BiJoiner<A,B> containingAnyOf(@NonNull Function<A,Collection<Property_>> leftMapping, @NonNull Function<B,Collection<Property_>> rightMapping)
      Joins every A and B where a collection of properties on A overlaps with a collection of properties on B.

      For example:

      • ["A", "B"] intersecting ["A", "B"] is true
      • ["A", "B"] intersecting ["A"] is true
      • ["A"] intersecting ["A", "B"] is true
      • ["A", "B"] intersecting ["X", "Y"] is false
      • ["A", "B"] intersecting [] is false
      • [] intersecting ["A", "B"] is false
      • [] intersecting [] is false
      Type Parameters:
      A - the type of object on the left
      B - the type of object on the right
      Property_ - the type of the property to compare
      Parameters:
      leftMapping - mapping function to apply to A
      rightMapping - mapping function to apply to B
    • containing

      public static <A, B, C, Property_> @NonNull TriJoiner<A,B,C> containing(@NonNull BiFunction<A,B,Collection<Property_>> leftMapping, @NonNull Function<C,Property_> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B)
      rightMapping - mapping function to apply to C
    • containedIn

      public static <A, B, C, Property_> @NonNull TriJoiner<A,B,C> containedIn(@NonNull BiFunction<A,B,Property_> leftMapping, @NonNull Function<C,Collection<Property_>> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B)
      rightMapping - mapping function to apply to C
    • containingAnyOf

      public static <A, B, C, Property_> @NonNull TriJoiner<A,B,C> containingAnyOf(@NonNull BiFunction<A,B,Collection<Property_>> leftMapping, @NonNull Function<C,Collection<Property_>> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B)
      rightMapping - mapping function to apply to C
    • containing

      public static <A, B, C, D, Property_> @NonNull QuadJoiner<A,B,C,D> containing(@NonNull TriFunction<A,B,C,Collection<Property_>> leftMapping, @NonNull Function<D,Property_> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the third object on the left
      D - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B,C)
      rightMapping - mapping function to apply to D
    • containedIn

      public static <A, B, C, D, Property_> @NonNull QuadJoiner<A,B,C,D> containedIn(@NonNull TriFunction<A,B,C,Property_> leftMapping, @NonNull Function<D,Collection<Property_>> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the third object on the left
      D - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B,C)
      rightMapping - mapping function to apply to D
    • containingAnyOf

      public static <A, B, C, D, Property_> @NonNull QuadJoiner<A,B,C,D> containingAnyOf(@NonNull TriFunction<A,B,C,Collection<Property_>> leftMapping, @NonNull Function<D,Collection<Property_>> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the third object on the left
      D - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B,C)
      rightMapping - mapping function to apply to D
    • containing

      public static <A, B, C, D, E, Property_> @NonNull PentaJoiner<A,B,C,D,E> containing(@NonNull QuadFunction<A,B,C,D,Collection<Property_>> leftMapping, @NonNull Function<E,Property_> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the third object on the left
      D - the type of the fourth object on the left
      E - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B,C,D)
      rightMapping - mapping function to apply to E
    • containedIn

      public static <A, B, C, D, E, Property_> @NonNull PentaJoiner<A,B,C,D,E> containedIn(@NonNull QuadFunction<A,B,C,D,Property_> leftMapping, @NonNull Function<E,Collection<Property_>> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the third object on the left
      D - the type of the fourth object on the left
      E - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B,C,D)
      rightMapping - mapping function to apply to E
    • containingAnyOf

      public static <A, B, C, D, E, Property_> @NonNull PentaJoiner<A,B,C,D,E> containingAnyOf(@NonNull QuadFunction<A,B,C,D,Collection<Property_>> leftMapping, @NonNull Function<E,Collection<Property_>> rightMapping)
      Type Parameters:
      A - the type of the first object on the left
      B - the type of the second object on the left
      C - the type of the third object on the left
      D - the type of the fourth object on the left
      E - the type of the object on the right
      Property_ - the type of the collection elements
      Parameters:
      leftMapping - mapping function to apply to (A,B,C,D)
      rightMapping - mapping function to apply to E