BusNetwork extends AbstractBusContainer<BusContainer<?>, BusLine> { @Pure public BusStop getBusStop(String name) { return getBusStop(name, null); } BusNetwork(String name, RoadNetwork roadNetwork, AttributeCollection attributeProvider);  BusNetwork(UUID id, String name, RoadNetwork roadNetwork, AttributeCollection attributeProvider);  BusNetwork(RoadNetwork roadNetwork, AttributeCollection attributeProvider);  BusNetwork(UUID id, RoadNetwork roadNetwork, AttributeCollection attributeProvider);  BusNetwork(String name, RoadNetwork roadNetwork);  BusNetwork(UUID id, String name, RoadNetwork roadNetwork);  BusNetwork(RoadNetwork roadNetwork);  BusNetwork(UUID id, RoadNetwork roadNetwork); @Override @Pure void toJson(JsonBuffer buffer); @Override @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"}) void rebuild(boolean fireEvents); @Override Class<? extends BusLine> getElementType(); @Override @Pure BusNetwork getBusNetwork(); @Pure RoadNetwork getRoadNetwork(); @Override Shape2d<?> getShape(); @Override @Pure int size(); @Override @Pure Iterator<BusLine> iterator(); @Pure boolean isValidBusStops(); @Pure boolean isValidBusHubs(); @Override void revalidate(); boolean addBusLine(BusLine busLine); boolean addBusLine(BusLine busLine, int index); void removeAllBusLines(); boolean removeBusLine(BusLine busLine); boolean removeBusLine(String name); boolean removeBusLine(int index); @Pure int getBusLineCount(); @Pure int indexOf(BusLine busLine); @Override @Pure int indexInParent(); @Pure BusLine getBusLineAt(int index); @Pure BusLine getBusLine(String name); @Pure BusLine getBusLine(UUID uuid); @Pure BusLine getBusLine(String name, Comparator<String> nameComparator); @Pure Iterator<BusLine> busLineIterator(); @Pure Iterable<BusLine> busLines(); boolean addBusStop(BusStop busStop); void removeAllBusStops(); boolean removeBusStop(BusStop busStop); boolean removeBusStop(String name); @Pure int getBusStopCount(); @Pure BusStop getBusStop(String name); @Pure BusStop getBusStop(UUID id); @Pure BusStop getBusStop(String name, Comparator<String> nameComparator); @Pure Iterator<BusStop> busStopIterator(); @Pure Iterable<BusStop> busStops(); @Pure Iterator<BusStop> getBusStopsIn(Rectangle2afp<?, ?, ?, ?, ?, ?> clipBounds); @Pure final BusStop getNearestBusStop(Point2D<?, ?> point); @Pure final BusStop getNearestBusStop(GeoLocationPoint point); @Pure BusStop getNearestBusStop(double x, double y); BusHub addBusHub(BusStop... stops); BusHub addBusHub(String name, BusStop... stops); void removeAllBusHubs(); boolean removeBusHub(BusHub busHub); boolean removeBusHub(String name); @Pure int getBusHubCount(); @Pure BusHub getBusHub(String name); @Pure BusHub getBusHub(UUID uuid); @Pure BusHub getBusHub(String name, Comparator<String> nameComparator); @Pure Iterator<BusHub> busHubIterator(); @Pure Iterable<BusHub> busHubs(); @Pure Iterator<BusHub> getBusHubsIn(Rectangle2afp<?, ?, ?, ?, ?, ?> clipBounds); @Pure final BusHub getNearestBusHub(Point2D<?, ?> point); @Pure final BusHub getNearestBusHub(GeoLocationPoint point); @Pure BusHub getNearestBusHub(double x, double y); @Override void onBusPrimitiveChanged(BusChangeEvent event);  }
@Test public void testGetBusStopString() { assertNull(this.network.getBusStop("STOP1")); assertNull(this.network.getBusStop("STOP2")); assertNull(this.network.getBusStop("STOP3")); assertNull(this.network.getBusStop("STOP4")); assertNull(this.network.getBusStop("STOP-TMP")); initTest(); assertSame(this.stop1, this.network.getBusStop("STOP1")); assertSame(this.stop2, this.network.getBusStop("STOP2")); assertSame(this.stop3, this.network.getBusStop("STOP3")); assertSame(this.stop4, this.network.getBusStop("STOP4")); assertNull(this.network.getBusStop("STOP-TMP")); }
@Test public void testGetBusStopUUID() { assertNull(this.network.getBusStop(this.stop1.getUUID())); assertNull(this.network.getBusStop(this.stop2.getUUID())); assertNull(this.network.getBusStop(this.stop3.getUUID())); assertNull(this.network.getBusStop(this.stop4.getUUID())); initTest(); assertSame(this.stop1, this.network.getBusStop(this.stop1.getUUID())); assertSame(this.stop2, this.network.getBusStop(this.stop2.getUUID())); assertSame(this.stop3, this.network.getBusStop(this.stop3.getUUID())); assertSame(this.stop4, this.network.getBusStop(this.stop4.getUUID())); }