Record Class RealInterval
java.lang.Object
java.lang.Record
tools.refinery.logic.term.realinterval.RealInterval
- All Implemented Interfaces:
Comparable<RealInterval>
,AbstractValue<RealInterval,
,BigDecimal> ComparableAbstractValue<RealInterval,
,BigDecimal> Add<RealInterval>
,Div<RealInterval>
,Exp<RealInterval>
,Log<RealInterval>
,Minus<RealInterval>
,Mul<RealInterval>
,Plus<RealInterval>
,Pow<RealInterval>
,Sqrt<RealInterval>
,Sub<RealInterval>
public record RealInterval(@NotNull RealBound lowerBound, @NotNull RealBound upperBound)
extends Record
implements ComparableAbstractValue<RealInterval,BigDecimal>, Comparable<RealInterval>, Plus<RealInterval>, Minus<RealInterval>, Add<RealInterval>, Sub<RealInterval>, Mul<RealInterval>, Div<RealInterval>, Exp<RealInterval>, Log<RealInterval>, Sqrt<RealInterval>, Pow<RealInterval>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RealInterval
static final RealInterval
static final RealInterval
static final RealInterval
static final RealInterval
static final RealInterval
static final RealInterval
-
Constructor Summary
ConstructorsConstructorDescriptionRealInterval
(@NotNull RealBound lowerBound, @NotNull RealBound upperBound) Creates an instance of aRealInterval
record class. -
Method Summary
Modifier and TypeMethodDescriptionadd
(RealInterval other) asInt()
checkEquals
(RealInterval other) checkLess
(RealInterval other) checkLessEq
(RealInterval other) int
compareTo
(@NotNull RealInterval other) div
(RealInterval other) final boolean
Indicates whether some other object is "equal to" this one.exp()
static RealInterval
fromInt
(IntInterval intInterval) @Nullable BigDecimal
@Nullable BigDecimal
final int
hashCode()
Returns a hash code value for this object.boolean
boolean
isError()
join
(RealInterval other) log()
@NotNull RealBound
Returns the value of thelowerBound
record component.max
(RealInterval other) meet
(RealInterval other) min
(RealInterval other) minus()
mul
(RealInterval other) static RealInterval
of
(BigDecimal value) static RealInterval
of
(BigDecimal value1, BigDecimal value2) static RealInterval
of
(BigDecimal value, RealBound bound) static RealInterval
of
(RealBound bound, BigDecimal value) static RealInterval
plus()
pow
(RealInterval other) sqrt()
sub
(RealInterval other) @NotNull String
toString()
Returns a string representation of this record class.@NotNull RealBound
Returns the value of theupperBound
record component.upToIncluding
(RealInterval 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
-
POSITIVE_ERROR
-
NEGATIVE_INFINITY
-
POSITIVE_INFINITY
-
-
Constructor Details
-
RealInterval
Creates an instance of aRealInterval
record class.- Parameters:
lowerBound
- the value for thelowerBound
record componentupperBound
- the value for theupperBound
record component
-
-
Method Details
-
getConcrete
- Specified by:
getConcrete
in interfaceAbstractValue<RealInterval,
BigDecimal>
-
isConcrete
public boolean isConcrete()- Specified by:
isConcrete
in interfaceAbstractValue<RealInterval,
BigDecimal>
-
getArbitrary
- Specified by:
getArbitrary
in interfaceAbstractValue<RealInterval,
BigDecimal>
-
isError
public boolean isError()- Specified by:
isError
in interfaceAbstractValue<RealInterval,
BigDecimal>
-
join
- Specified by:
join
in interfaceAbstractValue<RealInterval,
BigDecimal>
-
meet
- Specified by:
meet
in interfaceAbstractValue<RealInterval,
BigDecimal>
-
of
-
of
-
of
-
of
-
of
-
fromInt
-
asInt
-
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<RealInterval>
-
plus
- Specified by:
plus
in interfacePlus<RealInterval>
-
minus
- Specified by:
minus
in interfaceMinus<RealInterval>
-
add
- Specified by:
add
in interfaceAdd<RealInterval>
-
sub
- Specified by:
sub
in interfaceSub<RealInterval>
-
mul
- Specified by:
mul
in interfaceMul<RealInterval>
-
div
- Specified by:
div
in interfaceDiv<RealInterval>
-
exp
- Specified by:
exp
in interfaceExp<RealInterval>
-
log
- Specified by:
log
in interfaceLog<RealInterval>
-
sqrt
- Specified by:
sqrt
in interfaceSqrt<RealInterval>
-
pow
- Specified by:
pow
in interfacePow<RealInterval>
-
checkEquals
- Specified by:
checkEquals
in interfaceAbstractValue<RealInterval,
BigDecimal>
-
checkLess
- Specified by:
checkLess
in interfaceComparableAbstractValue<RealInterval,
BigDecimal>
-
checkLessEq
- Specified by:
checkLessEq
in interfaceComparableAbstractValue<RealInterval,
BigDecimal>
-
upToIncluding
- Specified by:
upToIncluding
in interfaceComparableAbstractValue<RealInterval,
BigDecimal>
-
min
- Specified by:
min
in interfaceComparableAbstractValue<RealInterval,
BigDecimal>
-
max
- Specified by:
max
in interfaceComparableAbstractValue<RealInterval,
BigDecimal>
-
abstractLowerBound
- Specified by:
abstractLowerBound
in interfaceComparableAbstractValue<RealInterval,
BigDecimal>
-
abstractUpperBound
- Specified by:
abstractUpperBound
in interfaceComparableAbstractValue<RealInterval,
BigDecimal>
-
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
-