Record Class CardinalityInterval
java.lang.Object
java.lang.Record
tools.refinery.logic.term.cardinalityinterval.CardinalityInterval
- All Implemented Interfaces:
Comparable<CardinalityInterval>,AbstractValue<CardinalityInterval,Integer>
public record CardinalityInterval(int lowerBound, UpperCardinality upperBound)
extends Record
implements AbstractValue<CardinalityInterval,Integer>
-
Constructor Summary
ConstructorsConstructorDescriptionCardinalityInterval(int lowerBound, UpperCardinality upperBound) Creates an instance of aCardinalityIntervalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(CardinalityInterval other) intcompareTo(@NotNull CardinalityInterval other) final booleanIndicates whether some other object is "equal to" this one.@Nullable Integer@Nullable Integerfinal inthashCode()Returns a hash code value for this object.booleanbooleanisError()booleanjoin(CardinalityInterval other) intReturns the value of thelowerBoundrecord component.max(CardinalityInterval other) meet(CardinalityInterval other) min(CardinalityInterval other) multiply(CardinalityInterval other) @Nullable CardinalityIntervaltake(int count) @NotNull StringtoString()Returns a string representation of this record class.Returns the value of theupperBoundrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.refinery.logic.AbstractValue
checkEquals, isOverlapping
-
Constructor Details
-
CardinalityInterval
Creates an instance of aCardinalityIntervalrecord class.- Parameters:
lowerBound- the value for thelowerBoundrecord componentupperBound- the value for theupperBoundrecord component
-
-
Method Details
-
getConcrete
- Specified by:
getConcretein interfaceAbstractValue<CardinalityInterval,Integer>
-
isConcrete
public boolean isConcrete()- Specified by:
isConcretein interfaceAbstractValue<CardinalityInterval,Integer>
-
getArbitrary
- Specified by:
getArbitraryin interfaceAbstractValue<CardinalityInterval,Integer>
-
isError
public boolean isError()- Specified by:
isErrorin interfaceAbstractValue<CardinalityInterval,Integer>
-
isRefinementOf
- Specified by:
isRefinementOfin interfaceAbstractValue<CardinalityInterval,Integer>
-
min
-
max
-
add
-
multiply
-
meet
- Specified by:
meetin interfaceAbstractValue<CardinalityInterval,Integer>
-
join
- Specified by:
joinin interfaceAbstractValue<CardinalityInterval,Integer>
-
take
-
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. -
compareTo
- Specified by:
compareToin interfaceComparable<CardinalityInterval>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
lowerBound
public int lowerBound()Returns the value of thelowerBoundrecord component.- Returns:
- the value of the
lowerBoundrecord component
-
upperBound
Returns the value of theupperBoundrecord component.- Returns:
- the value of the
upperBoundrecord component
-