Class SwitchAdapter

    • Method Detail

      • getKind

        public SwitchKind getKind()
        Description copied from interface: Switch
        Get the kind of switch.
        Specified by:
        getKind in interface Switch
      • isOpen

        public boolean isOpen()
        Description copied from interface: Switch
        Get the open status of the switch.

        Depends on the working variant.

        Specified by:
        isOpen in interface Switch
        See Also:
        VariantManager
      • setOpen

        public void setOpen​(boolean open)
        Description copied from interface: Switch
        Change the switch status.

        Depends on the working variant.

        Specified by:
        setOpen in interface Switch
        Parameters:
        open - the new switch status
        See Also:
        VariantManager
      • isRetained

        public boolean isRetained()
        Description copied from interface: Switch
        Get the retain status of the switch. A retained switch is a switch that will be part of the bus/breaker topology.
        Specified by:
        isRetained in interface Switch
      • setRetained

        public void setRetained​(boolean retained)
        Description copied from interface: Switch
        Change the retain status of the switch. A retained switch is a switch that will be part of the bus/breaker topology.
        Specified by:
        setRetained in interface Switch
        Parameters:
        retained - the retain status of the switch
      • removeProperty

        public boolean removeProperty​(String key)
        Description copied from interface: Identifiable
        Remove property with specified key.
        Specified by:
        removeProperty in interface Identifiable<I extends Identifiable<I>>
        Parameters:
        key - the property key
        Returns:
        true if property exists and has been removed, false otherwise
      • addExtension

        public <E extends Extension<I>> void addExtension​(Class<? super E> type,
                                                          E extension)
        Description copied from interface: Extendable
        Add en extension to this extendable object.
        Specified by:
        addExtension in interface Extendable<I extends Identifiable<I>>
        Type Parameters:
        E - the extension type
        Parameters:
        type - the extension class type
        extension - the extension
      • getExtension

        public <E extends Extension<I>> E getExtension​(Class<? super E> type)
        Description copied from interface: Extendable
        Get an extension based on its class type.
        Specified by:
        getExtension in interface Extendable<I extends Identifiable<I>>
        Type Parameters:
        E - the extension type
        Parameters:
        type - the extension class type
        Returns:
        the extension mapped to the class type or null if not found
      • getExtensionByName

        public <E extends Extension<I>> E getExtensionByName​(String name)
        Description copied from interface: Extendable
        Get an extension based on its name.
        Specified by:
        getExtensionByName in interface Extendable<I extends Identifiable<I>>
        Parameters:
        name - the extension name
        Returns:
        the extension mapped to the name or null if not found
      • removeExtension

        public <E extends Extension<I>> boolean removeExtension​(Class<E> type)
        Description copied from interface: Extendable
        Remove an extension based on its class type.
        Specified by:
        removeExtension in interface Extendable<I extends Identifiable<I>>
        Type Parameters:
        E - the extension type
        Parameters:
        type - the extension class type
        Returns:
        true if the extension has been removed false if extension has not been found
      • getExtensions

        public <E extends Extension<I>> Collection<E> getExtensions()
        Description copied from interface: Extendable
        Get all extensions associated with this extendable object..
        Specified by:
        getExtensions in interface Extendable<I extends Identifiable<I>>
        Returns:
        all extensions associated to this extendable object.
      • addAlias

        public void addAlias​(String alias)
        Description copied from interface: Identifiable
        Add an alias to the object. Aliases must be unique in associated Network, and different from any identifiable ID. No alias type is associated to this alias. If the alias already exists (i.e. is not unique) or equals an identifiable ID, throw a PowsyblException
        Specified by:
        addAlias in interface Identifiable<I extends Identifiable<I>>
      • addAlias

        public void addAlias​(String alias,
                             String aliasType)
        Description copied from interface: Identifiable
        Add an alias to the object. Aliases must be unique in associated Network, and different from any identifiable ID. This alias is associated to a given alias type. If the given alias type is null or empty, no alias type is considered associated to the alias. Only one alias can be associated to a non null given alias type for one object. If the alias already exists (i.e. is not unique) or equals an identifiable ID, throw a PowsyblException If a given non null type already has an associated alias for this object, throw a PowsyblException
        Specified by:
        addAlias in interface Identifiable<I extends Identifiable<I>>
      • getDelegate

        protected I getDelegate()
      • getIndex

        protected com.powsybl.iidm.mergingview.MergingViewIndex getIndex()