Class VoltageInterval

java.lang.Object
com.powsybl.iidm.criteria.VoltageInterval

public final class VoltageInterval extends Object
Author:
Olivier Perrin <olivier.perrin at rte-france.com>
  • Method Details

    • builder

      public static VoltageInterval.Builder builder()
      Return a builder to create an VoltageInterval.
      Returns:
      a builder
    • greaterThan

      public static VoltageInterval greaterThan(double value, boolean closed)

      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 the nominalVoltageLowBound attribute of the interval)
      closed - is the bound included in the interval (it corresponds to the lowClosed attribute of the interval)
      Returns:
      an interval
    • lowerThan

      public static VoltageInterval lowerThan(double value, boolean closed)

      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 the nominalVoltageHighBound attribute of the interval)
      closed - is the bound included in the interval (it corresponds to the highClosed 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 the nominalVoltageLowBound attribute of the interval)
      lowClosed - is the bound included in the interval (it corresponds to the lowClosed attribute of the interval)
      highBound - the upper bound of the interval to create (it corresponds to the nominalVoltageHighBound attribute of the interval)
      highClosed - is the bound included in the interval (it corresponds to the highClosed attribute of the interval)
      Returns:
      an interval
    • checkIsBetweenBound

      public boolean checkIsBetweenBound(Double value)

      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

      public Optional<Double> 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

      public Optional<Double> 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 if lowBound is part of the interval, false otherwise.
    • isHighClosed

      public boolean isHighClosed()
      Is the interval closed on the upper side?
      Returns:
      true if highBound 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