Record Class NonEmptyCardinalityInterval
java.lang.Object
java.lang.Record
tools.refinery.logic.term.cardinalityinterval.NonEmptyCardinalityInterval
- All Implemented Interfaces:
AbstractValue<CardinalityInterval,,Integer> CardinalityInterval
public record NonEmptyCardinalityInterval(int lowerBound, UpperCardinality upperBound)
extends Record
implements CardinalityInterval
-
Constructor Summary
ConstructorsConstructorDescriptionNonEmptyCardinalityInterval(int lowerBound, UpperCardinality upperBound) Creates an instance of aNonEmptyCardinalityIntervalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(CardinalityInterval other) booleanIndicates whether some other object is "equal to" this one.@NotNull Integer@Nullable IntegerinthashCode()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) take(int count) toString()Returns a string representation of this record class.Returns the value of theupperBoundrecord component.
-
Constructor Details
-
NonEmptyCardinalityInterval
Creates an instance of aNonEmptyCardinalityIntervalrecord 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
- Specified by:
minin interfaceCardinalityInterval
-
max
- Specified by:
maxin interfaceCardinalityInterval
-
add
- Specified by:
addin interfaceCardinalityInterval
-
multiply
- Specified by:
multiplyin interfaceCardinalityInterval
-
meet
- Specified by:
meetin interfaceAbstractValue<CardinalityInterval,Integer>
-
join
- Specified by:
joinin interfaceAbstractValue<CardinalityInterval,Integer>
-
take
- Specified by:
takein interfaceCardinalityInterval
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components 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. -
lowerBound
public int lowerBound()Returns the value of thelowerBoundrecord component.- Specified by:
lowerBoundin interfaceCardinalityInterval- Returns:
- the value of the
lowerBoundrecord component
-
upperBound
Returns the value of theupperBoundrecord component.- Specified by:
upperBoundin interfaceCardinalityInterval- Returns:
- the value of the
upperBoundrecord component
-