Interface Constraint
-
- All Known Implementing Classes:
AbstractConstraint
,BavetConstraint
,DroolsConstraint
public interface Constraint
This represents a single constraint in theConstraintStream
API that impacts theScore
. It is defined inConstraintProvider.defineConstraints(ConstraintFactory)
by callingConstraintFactory.forEach(Class)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description ConstraintFactory
getConstraintFactory()
Deprecated, for removal: This API element is subject to removal in a future version.for removal as it is not necessary on the public API.default String
getConstraintId()
The constraint id isthe constraint package
concatenated with "/" andthe constraint name
.String
getConstraintName()
The constraint name.String
getConstraintPackage()
The constraint package is the namespace of the constraint.
-
-
-
Method Detail
-
getConstraintFactory
@Deprecated(forRemoval=true) ConstraintFactory getConstraintFactory()
Deprecated, for removal: This API element is subject to removal in a future version.for removal as it is not necessary on the public API.TheConstraintFactory
that build this.- Returns:
- never null
-
getConstraintPackage
String getConstraintPackage()
The constraint package is the namespace of the constraint.When using a
ConstraintConfiguration
, it is equal to theConstraintWeight.constraintPackage()
.- Returns:
- never null
-
getConstraintName
String getConstraintName()
The constraint name. It might not be unique, butgetConstraintId()
is unique.When using a
ConstraintConfiguration
, it is equal to theConstraintWeight.value()
.- Returns:
- never null
-
getConstraintId
default String getConstraintId()
The constraint id isthe constraint package
concatenated with "/" andthe constraint name
. It is unique.- Returns:
- never null
-
-