java.lang.Object
java.lang.Record
org.maxicp.modeling.symbolic.SymbolicModel
- All Implemented Interfaces:
Iterable<Constraint>,Model
public record SymbolicModel(Constraint constraint, SymbolicModel parent, ModelProxy modelProxy)
extends Record
implements Model, Iterable<Constraint>
-
Constructor Summary
ConstructorsConstructorDescriptionSymbolicModel(Constraint constraint, SymbolicModel parent, ModelProxy modelProxy) Creates an instance of aSymbolicModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(Constraint c) branch(Constraint... constraints) Returns the SymbolicModels that would be created by branching on the constraints given in parametersReturns the value of theconstraintrecord component.static SymbolicModelemptyModel(ModelProxy modelProxy) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()iterator()maximize(Expression expr) minimize(Expression expr) Returns the value of themodelProxyrecord component.parent()Returns the value of theparentrecord 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 java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SymbolicModel
Creates an instance of aSymbolicModelrecord class.- Parameters:
constraint- the value for theconstraintrecord componentparent- the value for theparentrecord componentmodelProxy- the value for themodelProxyrecord component
-
-
Method Details
-
symbolicCopy
- Specified by:
symbolicCopyin interfaceModel
-
getConstraints
- Specified by:
getConstraintsin interfaceModel
-
getModelProxy
- Specified by:
getModelProxyin interfaceModel
-
emptyModel
-
isEmpty
public boolean isEmpty() -
add
-
minimize
-
maximize
-
branch
Returns the SymbolicModels that would be created by branching on the constraints given in parameters -
iterator
- Specified by:
iteratorin interfaceIterable<Constraint>
-
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). -
constraint
Returns the value of theconstraintrecord component.- Returns:
- the value of the
constraintrecord component
-
parent
Returns the value of theparentrecord component.- Returns:
- the value of the
parentrecord component
-
modelProxy
Returns the value of themodelProxyrecord component.- Returns:
- the value of the
modelProxyrecord component
-