Package org.drools.core.reteoo.builder
Class BuildUtils
java.lang.Object
org.drools.core.reteoo.builder.BuildUtils
Utility functions for reteoo build
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBuilder(Class<?> target, ReteooComponentBuilder builder) Adds the given builder for the given target to the builders map<T extends BaseNode>
TattachNode(BuildContext context, T candidate) Attaches a node into the network.calculateTemporalDistance(GroupElement groupElement) Calculates the temporal distance between all event patterns in the given subrule.createBetaNodeConstraint(BuildContext context, List<BetaConstraint> list, boolean disableIndexing) Creates and returns a BetaConstraints object for the given list of constraintsgetBuilderFor(Class cls) getBuilderFor(RuleConditionElement target) Returns a builder for the given target from the builders map
-
Constructor Details
-
BuildUtils
public BuildUtils()
-
-
Method Details
-
addBuilder
Adds the given builder for the given target to the builders map -
getBuilderFor
Returns a builder for the given target from the builders map -
getBuilderFor
-
attachNode
Attaches a node into the network. If a node already exists that could substitute, it is used instead.- Parameters:
context- The current build contextcandidate- The node to attach.- Returns:
- the actual attached node that may be the one given as parameter or eventually one that was already in the cache if sharing is enabled
-
createBetaNodeConstraint
public BetaConstraints createBetaNodeConstraint(BuildContext context, List<BetaConstraint> list, boolean disableIndexing) Creates and returns a BetaConstraints object for the given list of constraints- Parameters:
context- the current build contextlist- the list of constraints
-
calculateTemporalDistance
Calculates the temporal distance between all event patterns in the given subrule.- Parameters:
groupElement- the root element of a subrule being added to the rulebase
-