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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.refinery.logic.term.uppercardinality.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
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. -
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 '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
finiteUpperBound
public int finiteUpperBound()Returns the value of thefiniteUpperBoundrecord component.- Returns:
- the value of the
finiteUpperBoundrecord component
-