Package com.powsybl.iidm.reducer
Class IdentifierNetworkPredicate
- java.lang.Object
-
- com.powsybl.iidm.reducer.IdentifierNetworkPredicate
-
- All Implemented Interfaces:
NetworkPredicate
public class IdentifierNetworkPredicate extends Object implements NetworkPredicate
- Author:
- Mathieu Bague
-
-
Constructor Summary
Constructors Constructor Description IdentifierNetworkPredicate(Collection<String> ids)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdentifierNetworkPredicate
of(String... ids)
boolean
test(Substation substation)
Keep this substation if the IDs list contains the ID of this substation or one of its voltage levels.boolean
test(VoltageLevel voltageLevel)
Keep this voltage level if the IDs list contains the ID of this voltage level.
-
-
-
Constructor Detail
-
IdentifierNetworkPredicate
public IdentifierNetworkPredicate(Collection<String> ids)
-
-
Method Detail
-
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 interfaceNetworkPredicate
- 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 interfaceNetworkPredicate
- Parameters:
voltageLevel
- The voltage level to test- Returns:
- true if the IDs list contains the ID of this voltage level, false otherwise
-
-