Interface SlackTerminal
-
- All Superinterfaces:
Extension<VoltageLevel>
- All Known Implementing Classes:
SlackTerminalImpl
public interface SlackTerminal extends Extension<VoltageLevel>
- Author:
- Florian Dupuy
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static void
attach(Bus bus)
Create a SlackTerminal extension attached to the voltage level of the given bus, using the defaultTerminalFinder
strategy.default String
getName()
Return the name of this extension.Terminal
getTerminal()
Get the terminal pointed by the current SlackTerminalboolean
isEmpty()
Returns true if the current SlackTerminal is empty, meaning that this extension is unusedstatic void
reset(Network network)
Set the terminal of all SlackTerminal extensions from the given network to null.static void
reset(VoltageLevel voltageLevel, Terminal terminal)
Reset the slackTerminal extension to the given terminal (may be null)SlackTerminal
setTerminal(Terminal terminal)
Set the terminal pointed by the current SlackTerminaldefault SlackTerminal
setTerminal(Terminal terminal, boolean cleanIfEmpty)
Set the terminal pointed by the current SlackTerminal-
Methods inherited from interface com.powsybl.commons.extensions.Extension
getExtendable, setExtendable
-
-
-
-
Field Detail
-
NAME
static final String NAME
- See Also:
- Constant Field Values
-
-
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 fromterminal
- 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 defaultTerminalFinder
strategy.
-
getName
default String getName()
Description copied from interface:Extension
Return the name of this extension.- Specified by:
getName
in interfaceExtension<VoltageLevel>
-
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
-
-