Record Class Constraints.Cardinality
java.lang.Object
java.lang.Record
org.clafer.alloy.solve.Constraints.Cardinality
- Enclosing class:
Constraints
A cardinality,
upper -1 for none.-
Constructor Summary
ConstructorsConstructorDescriptionCardinality(long lower, long upper) Creates an instance of aCardinalityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longlower()Returns the value of thelowerrecord component.toString()Returns a string representation of this record class.longupper()Returns the value of theupperrecord component.
-
Constructor Details
-
Cardinality
Creates an instance of aCardinalityrecord class.- Parameters:
lower- the value for thelowerrecord componentupper- the value for theupperrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
lower
Returns the value of thelowerrecord component.- Returns:
- the value of the
lowerrecord component
-
upper
Returns the value of theupperrecord component.- Returns:
- the value of the
upperrecord component
-