BinaryConstraint

Representation of a Constraint operating on the left and right operands. This is a base class and is not directly constructed. Direct known subclasses include:

Fields

Summary:

MATCH_MODE_EXACT (0)

Exactly match the left and right sides of operation.

MATCH_MODE_REGEXP (1)

If possible, performs a regular expresion matching by treating the right side of the operation as a regular expression.This is only considered for String arguments.

MATCH_MODE_GLOB (2)

If possible, performs a glob-style matching by treating the right side of the operation as a glob expression. This is only considered for String arguments.

Methods

Summary:

getMatchMode()

Retrieves the match mode for this binary constraint operation.

setMatchMode(int matchMode)

Sets the match mode used by some individual binary operator constraints. The match mode only has effect if the operator supports the specified type and the type of the left and right side of the operation are compatible with the mode otherwise the default of MATCH_MODE_EXACT is assumed.

Inherited from Constraint class:

getFact()

Retrieves the fact id of the left side of the operation.

getFactValue()

If set with setFactValue(), retrieves the fact name whose value is used on the right side of the operation, otherwise this will return None.

getReason()

Retrieves the reason string that contains the human readable explanation that can be displayed as an error when a constraint evaluates to False.

getValue()

If set as a value, retrieves the value of the right side of the operation, otherwise it returns null.

setFact(String fact)

Sets the fact identification string for the left side of the operation.

setFactValue(String factvalue)

Sets the fact name whose value is used in the right side of the operation and, in doing so, negates any previous setValue() call.

setReason(String getReason())

Retrieves the reason string that contains the human readable explanation that can be displayed as an error when a constraint evaluates to false.

setValue(Object value)

Sets the value of the right side of the operation and, in doing so, negates any previous setFactValue() call.

See Also