Record Class FiniteUpperCardinality
java.lang.Object
java.lang.Record
tools.refinery.logic.term.uppercardinality.FiniteUpperCardinality
- All Implemented Interfaces:
Comparable<UpperCardinality>, UpperCardinality
public record FiniteUpperCardinality(int finiteUpperBound)
extends Record
implements UpperCardinality
-
Constructor Summary
ConstructorsConstructorDescriptionFiniteUpperCardinality(int finiteUpperBound) Creates an instance of aFiniteUpperCardinalityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(UpperCardinality other) intcompareTo(@NotNull UpperCardinality upperCardinality) intcompareToInt(int value) booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefiniteUpperBoundrecord component.inthashCode()Returns a hash code value for this object.multiply(UpperCardinality other) @Nullable UpperCardinalitytake(int count) toString()Returns a string representation of this record class.Methods inherited from interface UpperCardinality
max, min
-
Constructor Details
-
FiniteUpperCardinality
public FiniteUpperCardinality(int finiteUpperBound) Creates an instance of aFiniteUpperCardinalityrecord class.- Parameters:
finiteUpperBound- the value for thefiniteUpperBoundrecord component
-
-
Method Details
-
add
- Specified by:
addin interfaceUpperCardinality
-
take
- Specified by:
takein interfaceUpperCardinality
-
multiply
- Specified by:
multiplyin interfaceUpperCardinality
-
compareTo
- Specified by:
compareToin interfaceComparable<UpperCardinality>
-
compareToInt
public int compareToInt(int value) - Specified by:
compareToIntin interfaceUpperCardinality
-
toString
-
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. -
hashCode
-
finiteUpperBound
public int finiteUpperBound()Returns the value of thefiniteUpperBoundrecord component.- Returns:
- the value of the
finiteUpperBoundrecord component
-