Class SlackTerminalImpl
java.lang.Object
com.powsybl.commons.extensions.AbstractExtension<T>
com.powsybl.iidm.network.impl.AbstractMultiVariantIdentifiableExtension<VoltageLevel>
com.powsybl.iidm.network.impl.extensions.SlackTerminalImpl
- All Implemented Interfaces:
Extension<VoltageLevel>
,SlackTerminal
,MultiVariantObject
public class SlackTerminalImpl
extends AbstractMultiVariantIdentifiableExtension<VoltageLevel>
implements SlackTerminal
- Author:
- Florian Dupuy <florian.dupuy at rte-france.com>
-
Field Summary
Fields inherited from interface com.powsybl.iidm.network.extensions.SlackTerminal
NAME
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocateVariantArrayElement
(int[] indexes, int sourceIndex) Called to allocate a variant array element.void
deleteVariantArrayElement
(int index) Called to delete a variant array element.void
extendVariantArraySize
(int initVariantArraySize, int number, int sourceIndex) Called to extend the variant array.Get the terminal pointed by the current SlackTerminalboolean
isEmpty()
Returns true if the current SlackTerminal is empty, meaning that this extension is unusedvoid
reduceVariantArraySize
(int number) Called to reduce the variant array.setTerminal
(Terminal terminal) Set the terminal pointed by the current SlackTerminalMethods inherited from class com.powsybl.iidm.network.impl.AbstractMultiVariantIdentifiableExtension
getVariantIndex, getVariantManagerHolder
Methods inherited from class com.powsybl.commons.extensions.AbstractExtension
cleanup, getExtendable, setExtendable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.powsybl.commons.extensions.Extension
getExtendable, setExtendable
Methods inherited from interface com.powsybl.iidm.network.extensions.SlackTerminal
getName, setTerminal
-
Method Details
-
getTerminal
Description copied from interface:SlackTerminal
Get the terminal pointed by the current SlackTerminal- Specified by:
getTerminal
in interfaceSlackTerminal
- Returns:
- the corresponding terminal
-
setTerminal
Description copied from interface:SlackTerminal
Set the terminal pointed by the current SlackTerminal- Specified by:
setTerminal
in interfaceSlackTerminal
- Parameters:
terminal
- the corresponding terminal- Returns:
- the current SlackTerminal
-
isEmpty
public boolean isEmpty()Description copied from interface:SlackTerminal
Returns true if the current SlackTerminal is empty, meaning that this extension is unused- Specified by:
isEmpty
in interfaceSlackTerminal
-
extendVariantArraySize
public void extendVariantArraySize(int initVariantArraySize, int number, int sourceIndex) Description copied from interface:MultiVariantObject
Called to extend the variant array.- Specified by:
extendVariantArraySize
in interfaceMultiVariantObject
- Parameters:
initVariantArraySize
- initial variant array sizenumber
- number of element to addsourceIndex
- the variant index to use to initialize new variants
-
reduceVariantArraySize
public void reduceVariantArraySize(int number) Description copied from interface:MultiVariantObject
Called to reduce the variant array.- Specified by:
reduceVariantArraySize
in interfaceMultiVariantObject
- Parameters:
number
- number of element to remove
-
deleteVariantArrayElement
public void deleteVariantArrayElement(int index) Description copied from interface:MultiVariantObject
Called to delete a variant array element.- Specified by:
deleteVariantArrayElement
in interfaceMultiVariantObject
- Parameters:
index
- the index of the variant array to delete
-
allocateVariantArrayElement
public void allocateVariantArrayElement(int[] indexes, int sourceIndex) Description copied from interface:MultiVariantObject
Called to allocate a variant array element. All new variants will be initialize using values of the variant sourceIndex.- Specified by:
allocateVariantArrayElement
in interfaceMultiVariantObject
- Parameters:
indexes
- the indexes of the variant array to allocatesourceIndex
- the variant index to use to initialize new variants
-