Package com.powsybl.iidm.criteria
Class VoltageInterval
java.lang.Object
com.powsybl.iidm.criteria.VoltageInterval
- Author:
- Olivier Perrin <olivier.perrin at rte-france.com>
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.lang3.DoubleRange
asRange()
Return aDoubleRange
representation of the interval.static VoltageInterval
between
(double lowBound, double highBound, boolean lowClosed, boolean highClosed) Convenient method to easily create aVoltageInterval
with only a upper bound.static VoltageInterval.Builder
builder()
Return a builder to create anVoltageInterval
.boolean
checkIsBetweenBound
(Double value) Check if a value is inside the interval.Get the upper bound of the interval.Get the lower bound of the interval.static VoltageInterval
greaterThan
(double value, boolean closed) Convenient method to easily create aVoltageInterval
with only a lower bound.boolean
Is the interval closed on the upper side?boolean
Is the interval closed on the lower side?static VoltageInterval
lowerThan
(double value, boolean closed) Convenient method to easily create aVoltageInterval
with only a upper bound.
-
Method Details
-
builder
Return a builder to create anVoltageInterval
.- Returns:
- a builder
-
greaterThan
Convenient method to easily create a
VoltageInterval
with only a lower bound.- Parameters:
value
- the lower bound of the interval to create (it corresponds to thenominalVoltageLowBound
attribute of the interval)closed
- is the bound included in the interval (it corresponds to thelowClosed
attribute of the interval)- Returns:
- an interval
-
lowerThan
Convenient method to easily create a
VoltageInterval
with only a upper bound.- Parameters:
value
- the upper bound of the interval to create (it corresponds to thenominalVoltageHighBound
attribute of the interval)closed
- is the bound included in the interval (it corresponds to thehighClosed
attribute of the interval)- Returns:
- an interval
-
between
public static VoltageInterval between(double lowBound, double highBound, boolean lowClosed, boolean highClosed) Convenient method to easily create a
VoltageInterval
with only a upper bound.- Parameters:
lowBound
- the lower bound of the interval to create (it corresponds to thenominalVoltageLowBound
attribute of the interval)lowClosed
- is the bound included in the interval (it corresponds to thelowClosed
attribute of the interval)highBound
- the upper bound of the interval to create (it corresponds to thenominalVoltageHighBound
attribute of the interval)highClosed
- is the bound included in the interval (it corresponds to thehighClosed
attribute of the interval)- Returns:
- an interval
-
checkIsBetweenBound
Check if a value is inside the interval.
It returns
false
if the given value is null.- Parameters:
value
- the value to test- Returns:
true
if the value is inside the interval,false
otherwise.
-
getNominalVoltageLowBound
Get the lower bound of the interval.- Returns:
- lower bound of the acceptable interval, or
Optional.empty()
if the interval has no lower bound.
-
getNominalVoltageHighBound
Get the upper bound of the interval.- Returns:
- upper bound of the acceptable interval, or
Optional.empty()
if the interval has no upper bound.
-
isLowClosed
public boolean isLowClosed()Is the interval closed on the lower side?- Returns:
true
iflowBound
is part of the interval,false
otherwise.
-
isHighClosed
public boolean isHighClosed()Is the interval closed on the upper side?- Returns:
true
ifhighBound
is part of the interval,false
otherwise.
-
asRange
public org.apache.commons.lang3.DoubleRange asRange()Return a
DoubleRange
representation of the interval.- Returns:
- the interval as a
DoubleRange
-