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
ConstructorDescriptionFiniteUpperCardinality
(int finiteUpperBound) Creates an instance of aFiniteUpperCardinality
record class. -
Method Summary
Modifier and TypeMethodDescriptionadd
(UpperCardinality other) int
compareTo
(@NotNull UpperCardinality upperCardinality) int
compareToInt
(int value) boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of thefiniteUpperBound
record component.int
hashCode()
Returns a hash code value for this object.multiply
(UpperCardinality other) @Nullable UpperCardinality
take
(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, wait
Methods inherited from interface tools.refinery.logic.term.uppercardinality.UpperCardinality
max, min
-
Constructor Details
-
FiniteUpperCardinality
public FiniteUpperCardinality(int finiteUpperBound) Creates an instance of aFiniteUpperCardinality
record class.- Parameters:
finiteUpperBound
- the value for thefiniteUpperBound
record component
-
-
Method Details
-
add
- Specified by:
add
in interfaceUpperCardinality
-
take
- Specified by:
take
in interfaceUpperCardinality
-
multiply
- Specified by:
multiply
in interfaceUpperCardinality
-
compareTo
- Specified by:
compareTo
in interfaceComparable<UpperCardinality>
-
compareToInt
public int compareToInt(int value) - Specified by:
compareToInt
in 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 thefiniteUpperBound
record component.- Returns:
- the value of the
finiteUpperBound
record component
-