Class IdentifierNetworkPredicate

java.lang.Object
com.powsybl.iidm.reducer.IdentifierNetworkPredicate
All Implemented Interfaces:
NetworkPredicate

public class IdentifierNetworkPredicate extends Object implements NetworkPredicate
Author:
Mathieu Bague <mathieu.bague at rte-france.com>
  • Constructor Details

    • IdentifierNetworkPredicate

      public IdentifierNetworkPredicate(Collection<String> ids)
  • Method Details

    • of

      public static IdentifierNetworkPredicate of(String... ids)
    • test

      public boolean test(Substation substation)
      Keep this substation if the IDs list contains the ID of this substation or one of its voltage levels.
      Specified by:
      test in interface NetworkPredicate
      Parameters:
      substation - The substation to test
      Returns:
      true if the IDs list contains the ID of this substation or one of its voltage levels, false otherwise
    • test

      public boolean test(VoltageLevel voltageLevel)
      Keep this voltage level if the IDs list contains the ID of this voltage level.
      Specified by:
      test in interface NetworkPredicate
      Parameters:
      voltageLevel - The voltage level to test
      Returns:
      true if the IDs list contains the ID of this voltage level, false otherwise