Interface SlackTerminal

    • Method Detail

      • reset

        static void reset​(Network network)
        Set the terminal of all SlackTerminal extensions from the given network to null. If the extension is empty, meaning that for each variant the terminal is null, this method automatically remove the extension.
        Parameters:
        network - A network to cleanup
      • reset

        static void reset​(VoltageLevel voltageLevel,
                          Terminal terminal)
        Reset the slackTerminal extension to the given terminal (may be null)
        Parameters:
        voltageLevel - the voltageLevel to reset the slackTerminal extension from
        terminal - the terminal to reset the extension to (may be null)
      • attach

        static void attach​(Bus bus)
        Create a SlackTerminal extension attached to the voltage level of the given bus, using the default TerminalFinder strategy.
      • getTerminal

        Terminal getTerminal()
        Get the terminal pointed by the current SlackTerminal
        Returns:
        the corresponding terminal
      • setTerminal

        SlackTerminal setTerminal​(Terminal terminal)
        Set the terminal pointed by the current SlackTerminal
        Parameters:
        terminal - the corresponding terminal
        Returns:
        the current SlackTerminal
      • setTerminal

        default SlackTerminal setTerminal​(Terminal terminal,
                                          boolean cleanIfEmpty)
        Set the terminal pointed by the current SlackTerminal
        Parameters:
        terminal - the corresponding terminal (may be null)
        cleanIfEmpty - if true and if the slackTerminal is empty, removes the SlackTerminal extension from the corresponding VoltageLevel
        Returns:
        the current SlackTerminal
      • isEmpty

        boolean isEmpty()
        Returns true if the current SlackTerminal is empty, meaning that this extension is unused