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 IntInterval
static final IntInterval
static final IntInterval
static final IntInterval
static final IntInterval
static final IntInterval
-
Constructor Summary
ConstructorsConstructorDescriptionIntInterval
(@NotNull IntBound lowerBound, @NotNull IntBound upperBound) Creates an instance of aIntInterval
record class. -
Method Summary
Modifier and TypeMethodDescriptionadd
(IntInterval other) checkEquals
(IntInterval other) checkLess
(IntInterval other) checkLessEq
(IntInterval other) int
compareTo
(@NotNull IntInterval other) div
(IntInterval other) final boolean
Indicates whether some other object is "equal to" this one.@Nullable Integer
@Nullable Integer
final int
hashCode()
Returns a hash code value for this object.boolean
boolean
isError()
join
(IntInterval other) @NotNull IntBound
Returns the value of thelowerBound
record component.max
(IntInterval other) meet
(IntInterval other) min
(IntInterval other) minus()
mul
(IntInterval other) static IntInterval
of
(int value) static IntInterval
of
(int value1, int value2) static IntInterval
static IntInterval
static IntInterval
plus()
sub
(IntInterval other) @NotNull String
toString()
Returns a string representation of this record class.@NotNull IntBound
Returns the value of theupperBound
record component.upToIncluding
(IntInterval other) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 aIntInterval
record class.- Parameters:
lowerBound
- the value for thelowerBound
record componentupperBound
- the value for theupperBound
record component
-
-
Method Details
-
getConcrete
- Specified by:
getConcrete
in interfaceAbstractValue<IntInterval,
Integer>
-
isConcrete
public boolean isConcrete()- Specified by:
isConcrete
in interfaceAbstractValue<IntInterval,
Integer>
-
getArbitrary
- Specified by:
getArbitrary
in interfaceAbstractValue<IntInterval,
Integer>
-
isError
public boolean isError()- Specified by:
isError
in interfaceAbstractValue<IntInterval,
Integer>
-
join
- Specified by:
join
in interfaceAbstractValue<IntInterval,
Integer>
-
meet
- Specified by:
meet
in 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:
compareTo
in interfaceComparable<IntInterval>
-
plus
- Specified by:
plus
in interfacePlus<IntInterval>
-
minus
- Specified by:
minus
in interfaceMinus<IntInterval>
-
add
- Specified by:
add
in interfaceAdd<IntInterval>
-
sub
- Specified by:
sub
in interfaceSub<IntInterval>
-
mul
- Specified by:
mul
in interfaceMul<IntInterval>
-
div
- Specified by:
div
in interfaceDiv<IntInterval>
-
checkEquals
- Specified by:
checkEquals
in interfaceAbstractValue<IntInterval,
Integer>
-
checkLess
- Specified by:
checkLess
in interfaceComparableAbstractValue<IntInterval,
Integer>
-
checkLessEq
- Specified by:
checkLessEq
in interfaceComparableAbstractValue<IntInterval,
Integer>
-
upToIncluding
- Specified by:
upToIncluding
in interfaceComparableAbstractValue<IntInterval,
Integer>
-
min
- Specified by:
min
in interfaceComparableAbstractValue<IntInterval,
Integer>
-
max
- Specified by:
max
in interfaceComparableAbstractValue<IntInterval,
Integer>
-
abstractLowerBound
- Specified by:
abstractLowerBound
in interfaceComparableAbstractValue<IntInterval,
Integer>
-
abstractUpperBound
- Specified by:
abstractUpperBound
in 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 thelowerBound
record component.- Returns:
- the value of the
lowerBound
record component
-
upperBound
Returns the value of theupperBound
record component.- Returns:
- the value of the
upperBound
record component
-