class DroolsFlatteningUniConstraintStream<Solution_, NewA>
        extends DroolsAbstractUniConstraintStream<Solution_, NewA> {

    private final Supplier<UniLeftHandSide<NewA>> leftHandSide;

    public <A> DroolsFlatteningUniConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory,
            DroolsAbstractUniConstraintStream<Solution_, A> parent, Function<A, Iterable<NewA>> mapping) {
        super(constraintFactory, parent.getRetrievalSemantics());
        this.leftHandSide = () -> parent.createLeftHandSide().andFlattenLast(mapping);
    }

    @Override
    public boolean guaranteesDistinct() {<FILL_FUNCTION_BODY>}

    // ************************************************************************
    // Pattern creation
    // ************************************************************************

    @Override
    public UniLeftHandSide<NewA> createLeftHandSide() {
        return leftHandSide.get();
    }

    @Override
    public String toString() {
        return "Flatten() with " + getChildStreams().size() + " children";
    }

}

        return false; // flattening can never guarantee distinct tuples, as we do not see inside the Iterable.
    
<methods>public void <init>(DroolsConstraintFactory<Solution_>, org.optaplanner.constraint.streams.common.RetrievalSemantics) ,public UniConstraintStream<NewA> filter(Predicate<NewA>) ,public UniConstraintStream<ResultA_> flattenLast(Function<NewA,Iterable<ResultA_>>) ,public UniConstraintStream<Result_> groupBy(UniConstraintCollector<NewA,ResultContainer_,Result_>) ,public BiConstraintStream<ResultA_,ResultB_> groupBy(UniConstraintCollector<NewA,ResultContainerA_,ResultA_>, UniConstraintCollector<NewA,ResultContainerB_,ResultB_>) ,public TriConstraintStream<ResultA_,ResultB_,ResultC_> groupBy(UniConstraintCollector<NewA,ResultContainerA_,ResultA_>, UniConstraintCollector<NewA,ResultContainerB_,ResultB_>, UniConstraintCollector<NewA,ResultContainerC_,ResultC_>) ,public QuadConstraintStream<ResultA_,ResultB_,ResultC_,ResultD_> groupBy(UniConstraintCollector<NewA,ResultContainerA_,ResultA_>, UniConstraintCollector<NewA,ResultContainerB_,ResultB_>, UniConstraintCollector<NewA,ResultContainerC_,ResultC_>, UniConstraintCollector<NewA,ResultContainerD_,ResultD_>) ,public UniConstraintStream<GroupKey_> groupBy(Function<NewA,GroupKey_>) ,public BiConstraintStream<GroupKey_,Result_> groupBy(Function<NewA,GroupKey_>, UniConstraintCollector<NewA,ResultContainer_,Result_>) ,public TriConstraintStream<GroupKey_,ResultB_,ResultC_> groupBy(Function<NewA,GroupKey_>, UniConstraintCollector<NewA,ResultContainerB_,ResultB_>, UniConstraintCollector<NewA,ResultContainerC_,ResultC_>) ,public QuadConstraintStream<GroupKey_,ResultB_,ResultC_,ResultD_> groupBy(Function<NewA,GroupKey_>, UniConstraintCollector<NewA,ResultContainerB_,ResultB_>, UniConstraintCollector<NewA,ResultContainerC_,ResultC_>, UniConstraintCollector<NewA,ResultContainerD_,ResultD_>) ,public BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(Function<NewA,GroupKeyA_>, Function<NewA,GroupKeyB_>) ,public TriConstraintStream<GroupKeyA_,GroupKeyB_,Result_> groupBy(Function<NewA,GroupKeyA_>, Function<NewA,GroupKeyB_>, UniConstraintCollector<NewA,ResultContainer_,Result_>) ,public QuadConstraintStream<GroupKeyA_,GroupKeyB_,ResultC_,ResultD_> groupBy(Function<NewA,GroupKeyA_>, Function<NewA,GroupKeyB_>, UniConstraintCollector<NewA,ResultContainerC_,ResultC_>, UniConstraintCollector<NewA,ResultContainerD_,ResultD_>) ,public TriConstraintStream<GroupKeyA_,GroupKeyB_,GroupKeyC_> groupBy(Function<NewA,GroupKeyA_>, Function<NewA,GroupKeyB_>, Function<NewA,GroupKeyC_>) ,public QuadConstraintStream<GroupKeyA_,GroupKeyB_,GroupKeyC_,ResultD_> groupBy(Function<NewA,GroupKeyA_>, Function<NewA,GroupKeyB_>, Function<NewA,GroupKeyC_>, UniConstraintCollector<NewA,ResultContainerD_,ResultD_>) ,public QuadConstraintStream<GroupKeyA_,GroupKeyB_,GroupKeyC_,GroupKeyD_> groupBy(Function<NewA,GroupKeyA_>, Function<NewA,GroupKeyB_>, Function<NewA,GroupKeyC_>, Function<NewA,GroupKeyD_>) ,public final transient UniConstraintStream<NewA> ifExists(Class<B>, BiJoiner<NewA,B>[]) ,public final transient UniConstraintStream<NewA> ifExistsIncludingNullVars(Class<B>, BiJoiner<NewA,B>[]) ,public final transient UniConstraintStream<NewA> ifNotExists(Class<B>, BiJoiner<NewA,B>[]) ,public final transient UniConstraintStream<NewA> ifNotExistsIncludingNullVars(Class<B>, BiJoiner<NewA,B>[]) ,public UniConstraintBuilder<NewA,Score_> innerImpact(Score_, ToIntFunction<NewA>, org.optaplanner.constraint.streams.common.ScoreImpactType) ,public UniConstraintBuilder<NewA,Score_> innerImpact(Score_, ToLongFunction<NewA>, org.optaplanner.constraint.streams.common.ScoreImpactType) ,public UniConstraintBuilder<NewA,Score_> innerImpact(Score_, Function<NewA,java.math.BigDecimal>, org.optaplanner.constraint.streams.common.ScoreImpactType) ,public final transient BiConstraintStream<NewA,B> join(UniConstraintStream<B>, BiJoiner<NewA,B>[]) ,public final BiConstraintStream<NewA,B> join(UniConstraintStream<B>, BiJoinerComber<NewA,B>) ,public UniConstraintStream<ResultA_> map(Function<NewA,ResultA_>) <variables>