Class AbstractConstraintStreamHelper<Right,JoinedStream,Joiner,Predicate>
- java.lang.Object
-
- org.optaplanner.core.impl.score.stream.common.AbstractConstraintStreamHelper<Right,JoinedStream,Joiner,Predicate>
-
- Direct Known Subclasses:
BiConstraintStreamHelper,TriConstraintStreamHelper,UniConstraintStreamHelper
public abstract class AbstractConstraintStreamHelper<Right,JoinedStream,Joiner,Predicate> extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractConstraintStreamHelper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract JoinedStreamdoJoin(UniConstraintStream<Right> otherStream)protected abstract JoinedStreamdoJoin(UniConstraintStream<Right> otherStream, Joiner joiner)protected abstract JoinedStreamdoJoin(UniConstraintStream<Right> otherStream, Joiner... joiners)protected abstract PredicateextractPredicate(Joiner joiner)protected abstract JoinedStreamfilter(JoinedStream stream, Predicate predicate)protected abstract booleanisFilteringJoiner(Joiner joiner)JoinedStreamjoin(UniConstraintStream<Right> otherStream, Joiner... joiners)Converts a set of joiners into a single composite joiner, optionally followed by some filters.protected abstract JoinermergeJoiners(Joiner... joiners)protected abstract PredicatemergePredicates(Predicate predicate1, Predicate predicate2)
-
-
-
Method Detail
-
doJoin
protected abstract JoinedStream doJoin(UniConstraintStream<Right> otherStream)
-
doJoin
protected abstract JoinedStream doJoin(UniConstraintStream<Right> otherStream, Joiner joiner)
-
doJoin
protected abstract JoinedStream doJoin(UniConstraintStream<Right> otherStream, Joiner... joiners)
-
filter
protected abstract JoinedStream filter(JoinedStream stream, Predicate predicate)
-
isFilteringJoiner
protected abstract boolean isFilteringJoiner(Joiner joiner)
-
mergePredicates
protected abstract Predicate mergePredicates(Predicate predicate1, Predicate predicate2)
-
join
public final JoinedStream join(UniConstraintStream<Right> otherStream, Joiner... joiners)
Converts a set of joiners into a single composite joiner, optionally followed by some filters. Ensures that the joiners are properly ordered filters-last.- Parameters:
otherStream- never nulljoiners- never null- Returns:
- never null, stream with all the joiners applied
-
-