Record Class IntInterval
java.lang.Object
java.lang.Record
tools.refinery.logic.term.intinterval.IntInterval
- All Implemented Interfaces:
Comparable<IntInterval>,AbstractValue<IntInterval,,Integer> ComparableAbstractValue<IntInterval,,Integer> Add<IntInterval>,Div<IntInterval>,Minus<IntInterval>,Mul<IntInterval>,Plus<IntInterval>,Sub<IntInterval>
public record IntInterval(@NotNull IntBound lowerBound, @NotNull IntBound upperBound)
extends Record
implements ComparableAbstractValue<IntInterval,Integer>, Comparable<IntInterval>, Plus<IntInterval>, Minus<IntInterval>, Add<IntInterval>, Sub<IntInterval>, Mul<IntInterval>, Div<IntInterval>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntIntervalstatic final IntIntervalstatic final IntIntervalstatic final IntIntervalstatic final IntIntervalstatic final IntInterval -
Constructor Summary
ConstructorsConstructorDescriptionIntInterval(@NotNull IntBound lowerBound, @NotNull IntBound upperBound) Creates an instance of aIntIntervalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(IntInterval other) checkEquals(IntInterval other) checkLess(IntInterval other) checkLessEq(IntInterval other) intcompareTo(@NotNull IntInterval other) div(IntInterval 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()join(IntInterval other) @NotNull IntBoundReturns the value of thelowerBoundrecord component.max(IntInterval other) meet(IntInterval other) min(IntInterval other) minus()mul(IntInterval other) static IntIntervalof(int value) static IntIntervalof(int value1, int value2) static IntIntervalstatic IntIntervalstatic IntIntervalplus()sub(IntInterval other) @NotNull StringtoString()Returns a string representation of this record class.@NotNull IntBoundReturns the value of theupperBoundrecord component.upToIncluding(IntInterval other) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.refinery.logic.AbstractValue
isOverlapping, isRefinementOf
-
Field Details
-
ZERO
-
ONE
-
UNKNOWN
-
ERROR
-
NEGATIVE_INFINITY
-
POSITIVE_INFINITY
-
-
Constructor Details
-
IntInterval
Creates an instance of aIntIntervalrecord class.- Parameters:
lowerBound- the value for thelowerBoundrecord componentupperBound- the value for theupperBoundrecord component
-
-
Method Details
-
getConcrete
- Specified by:
getConcretein interfaceAbstractValue<IntInterval,Integer>
-
isConcrete
public boolean isConcrete()- Specified by:
isConcretein interfaceAbstractValue<IntInterval,Integer>
-
getArbitrary
- Specified by:
getArbitraryin interfaceAbstractValue<IntInterval,Integer>
-
isError
public boolean isError()- Specified by:
isErrorin interfaceAbstractValue<IntInterval,Integer>
-
join
- Specified by:
joinin interfaceAbstractValue<IntInterval,Integer>
-
meet
- Specified by:
meetin interfaceAbstractValue<IntInterval,Integer>
-
of
-
of
-
of
-
of
-
of
-
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<IntInterval>
-
plus
- Specified by:
plusin interfacePlus<IntInterval>
-
minus
- Specified by:
minusin interfaceMinus<IntInterval>
-
add
- Specified by:
addin interfaceAdd<IntInterval>
-
sub
- Specified by:
subin interfaceSub<IntInterval>
-
mul
- Specified by:
mulin interfaceMul<IntInterval>
-
div
- Specified by:
divin interfaceDiv<IntInterval>
-
checkEquals
- Specified by:
checkEqualsin interfaceAbstractValue<IntInterval,Integer>
-
checkLess
- Specified by:
checkLessin interfaceComparableAbstractValue<IntInterval,Integer>
-
checkLessEq
- Specified by:
checkLessEqin interfaceComparableAbstractValue<IntInterval,Integer>
-
upToIncluding
- Specified by:
upToIncludingin interfaceComparableAbstractValue<IntInterval,Integer>
-
min
- Specified by:
minin interfaceComparableAbstractValue<IntInterval,Integer>
-
max
- Specified by:
maxin interfaceComparableAbstractValue<IntInterval,Integer>
-
abstractLowerBound
- Specified by:
abstractLowerBoundin interfaceComparableAbstractValue<IntInterval,Integer>
-
abstractUpperBound
- Specified by:
abstractUpperBoundin interfaceComparableAbstractValue<IntInterval,Integer>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
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
-