java.lang.Object
java.lang.Record
org.maxicp.modeling.constraints.scheduling.Alternative
- Record Components:
real- interval to synchronize withnalternativesn- number of intervals inalternativesto synchronizealternatives- candidate for synchronization of intervalreal
- All Implemented Interfaces:
Constraint,org.maxicp.modeling.constraints.helpers.CacheScope,org.maxicp.modeling.constraints.helpers.ConstraintFromRecord
public record Alternative(IntervalVar real, IntExpression n, IntervalVar[] alternatives)
extends Record
implements org.maxicp.modeling.constraints.helpers.ConstraintFromRecord
Exclusive alternative between intervals. If interval
real is present, then exactly n intervals
in alternatives are present and starts and ends together with real-
Nested Class Summary
Nested classes/interfaces inherited from interface org.maxicp.modeling.constraints.helpers.ConstraintFromRecord
org.maxicp.modeling.constraints.helpers.ConstraintFromRecord.IgnoreScope -
Constructor Summary
ConstructorsConstructorDescriptionAlternative(IntervalVar real, IntExpression n, IntervalVar... alternatives) Creates an instance of aAlternativerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealternativesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.n()Returns the value of thenrecord component.real()Returns the value of therealrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.maxicp.modeling.constraints.helpers.CacheScope
scopeMethods inherited from interface org.maxicp.modeling.constraints.helpers.ConstraintFromRecord
computeScope
-
Constructor Details
-
Alternative
Creates an instance of aAlternativerecord class.- Parameters:
real- the value for therealrecord componentn- the value for thenrecord componentalternatives- the value for thealternativesrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
real
Returns the value of therealrecord component.- Returns:
- the value of the
realrecord component
-
n
Returns the value of thenrecord component.- Returns:
- the value of the
nrecord component
-
alternatives
Returns the value of thealternativesrecord component.- Returns:
- the value of the
alternativesrecord component
-