java.lang.Object
java.lang.Record
org.maxicp.modeling.constraints.Cumulative
- All Implemented Interfaces:
Constraint,org.maxicp.modeling.constraints.helpers.CacheScope,org.maxicp.modeling.constraints.helpers.ConstraintFromRecord
public record Cumulative(IntExpression[] start, int[] duration, int[] demand, int capa)
extends Record
implements org.maxicp.modeling.constraints.helpers.ConstraintFromRecord
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.maxicp.modeling.constraints.helpers.ConstraintFromRecord
org.maxicp.modeling.constraints.helpers.ConstraintFromRecord.IgnoreScope -
Constructor Summary
ConstructorsConstructorDescriptionCumulative(IntExpression[] start, int[] duration, int[] demand, int capa) Creates an instance of aCumulativerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcapa()Returns the value of thecaparecord component.int[]demand()Returns the value of thedemandrecord component.int[]duration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.start()Returns the value of thestartrecord 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
-
Cumulative
Creates an instance of aCumulativerecord class.- Parameters:
start- the value for thestartrecord componentduration- the value for thedurationrecord componentdemand- the value for thedemandrecord componentcapa- the value for thecaparecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
duration
public int[] duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
demand
public int[] demand()Returns the value of thedemandrecord component.- Returns:
- the value of the
demandrecord component
-
capa
public int capa()Returns the value of thecaparecord component.- Returns:
- the value of the
caparecord component
-