SynchronousComponentsManager getSynchronousComponentsManager() { return variants.get().synchronousComponentsManager; }
ConnectedComponentsManager getConnectedComponentsManager() { return variants.get().connectedComponentsManager; }
CalculatedBusTopology getCalculatedBusTopology() { return variants.get().calculatedBusTopology; }
@Override public Switch getSwitch(String switchId) { return variants.get().calculatedBusBreakerTopology.getSwitch(switchId, true); }
@Override public CalculatedBus getBus(String id) { return variants.get().calculatedBusBreakerTopology.getBus(id, false); }
@Override public Stream<Switch> getSwitchStream() { return variants.get().calculatedBusBreakerTopology.getSwitchStream(); }
@Override public Iterable<Switch> getSwitches() { return Iterables.filter(variants.get().calculatedBusBreakerTopology.getSwitches(), Switch.class); // just to upcast and return an unmodifiable iterable }
@Override public Stream<Bus> getBusStream() { return variants.get().calculatedBusTopology.getBuses().stream().map(Function.identity()); }
@Override public Stream<Bus> getBusStream() { return variants.get().calculatedBusBreakerTopology.getBuses().stream().map(Function.identity()); }
@Override public int getSwitchCount() { return variants.get().calculatedBusBreakerTopology.getSwitchCount(); }
@Override public Bus getBus1(String switchId) { return variants.get().calculatedBusBreakerTopology.getBus1(switchId, true); }
@Override public Bus getBus2(String switchId) { return variants.get().calculatedBusBreakerTopology.getBus2(switchId, true); }
@Override public Collection<Component> getConnectedComponents() { return Collections.unmodifiableList(variants.get().connectedComponentsManager.getConnectedComponents()); }
@Override public Iterable<Bus> getBuses() { return Collections.unmodifiableCollection(variants.get().calculatedBusTopology.getBuses()); }
MergedBus getMergedBus(ConfiguredBus bus) { Objects.requireNonNull(bus, "bus is null"); updateCache(); return variants.get().cache.getMergedBus(bus); }
private Collection<MergedBus> getMergedBuses() { updateCache(); return variants.get().cache.getMergedBuses(); }
private MergedBus getMergedBus(String mergedBusId, boolean throwException) { updateCache(); MergedBus bus = variants.get().cache.getMergedBus(mergedBusId); if (throwException && bus == null) { throw new PowsyblException("Bus " + mergedBusId + " not found in substation voltage level " + BusBreakerVoltageLevel.this.id); } return bus; }
@Override public Bus getMergedBus(String busBarId) { NodeTerminal nt = (NodeTerminal) nodeBreakerView.getBusbarSection(busBarId).getTerminal(); int node = nt.getNode(); return variants.get().calculatedBusTopology.getBus(node); } };