java.lang.Object
java.lang.Record
org.maxicp.modeling.constraints.scheduling.LessOrEqual
- All Implemented Interfaces:
Constraint,org.maxicp.modeling.constraints.helpers.CacheScope,org.maxicp.modeling.constraints.helpers.ConstraintFromRecord
public record LessOrEqual(CumulFunction function, int limit)
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
ConstructorsConstructorDescriptionLessOrEqual(CumulFunction function, int limit) Creates an instance of aLessOrEqualrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.intlimit()Returns the value of thelimitrecord 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
-
LessOrEqual
Creates an instance of aLessOrEqualrecord class.- Parameters:
function- the value for thefunctionrecord componentlimit- the value for thelimitrecord 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 '=='. -
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-