- java.lang.Object
-
- org.arakhne.afc.gis.primitive.AbstractGISElement<C,T>
-
- org.arakhne.afc.gis.primitive.AbstractBoundedGISElement<CONTAINER,AbstractBusPrimitive<CONTAINER>>
-
- org.arakhne.afc.gis.bus.network.AbstractBusPrimitive<CONTAINER>
-
- org.arakhne.afc.gis.bus.network.AbstractBusContainer<BusLine,BusItineraryHalt>
-
- org.arakhne.afc.gis.bus.network.BusItinerary
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<BusItineraryHalt>,EventListener,AttributeChangeListener,AttributeCollection,AttributeProvider,BusChangeListener,BusContainer<BusItineraryHalt>,BusPrimitive<BusLine>,BoundedGISElement,FlagContainer,GISCloneable<AbstractBusPrimitive<BusLine>>,GISContainer<BusItineraryHalt>,GISEditable,GISElement,GISFlagContainer,GISPrimitive,RoadNetworkListener,BoundedElement2afp<Rectangle2d>,InformedIterable<BusItineraryHalt>,JsonableObject
public class BusItinerary extends AbstractBusContainer<BusLine,BusItineraryHalt> implements RoadNetworkListener
A bus itinerary is a sequence ofroad segmentswhich are followed by a bus.Validation
An itinerary could be invalid if one of the following critera is not true:- an itinerary must contains one road segment,
- all the road segments are connected in a sequence,
- the count of bus halts must be greater or equal to 2,
- each bus halt must be valid,
- the first halt must be marked as a starting bus halt,
- the last halt must be marked as a terminus,
- the other bus halts must not be marked as starting bus halt nor terminus,
- each bus halt must be located on a road segment of the itinerary,
- the bus halts must be ordered, no cycle nor go-back is allowed.
- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:56
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- gisbus
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.gis.bus.network.AbstractBusPrimitive
ATTR_COLOR, DEFAULT_COLOR
-
Fields inherited from interface org.arakhne.afc.gis.primitive.FlagContainer
FLAG_READONLY, FLAG_SELECTED
-
Fields inherited from interface org.arakhne.afc.gis.primitive.GISElement
ATTR_NAME, NAME_COMPARATOR
-
Fields inherited from interface org.arakhne.afc.gis.primitive.GISPrimitive
COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description BusItinerary()Create bus itinerary with attributes stored in memory.BusItinerary(String name)Create bus itinerary with attributes stored in memory.BusItinerary(String name, AttributeCollection attributeProvider)Create bus itinerary.BusItinerary(UUID id)Create bus itinerary with attributes stored in memory.BusItinerary(UUID id, String name)Create bus itinerary with attributes stored in memory.BusItinerary(UUID id, String name, AttributeCollection attributeProvider)Create bus itinerary.BusItinerary(UUID id, AttributeCollection attributeProvider)Create bus itinerary.BusItinerary(UUID id, BusLine busline)Create bus itinerary with attributes stored in memory.BusItinerary(UUID id, BusLine busline, String name)Create bus itinerary with attributes stored in memory.BusItinerary(UUID id, BusLine busline, String name, AttributeCollection attributeProvider)Create bus itinerary.BusItinerary(UUID id, BusLine busline, AttributeCollection attributeProvider)Create bus itinerary.BusItinerary(AttributeCollection attributeProvider)Create bus itinerary.BusItinerary(BusLine busline)Create bus itinerary with attributes stored in memory.BusItinerary(BusLine busline, String name)Create bus itinerary with attributes stored in memory.BusItinerary(BusLine busline, String name, AttributeCollection attributeProvider)Create bus itinerary.BusItinerary(BusLine busline, AttributeCollection attributeProvider)Create bus itinerary.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BusItineraryHaltaddBusHalt(String name, BusItineraryHalt.BusItineraryHaltType type)Add a bus halt inside the bus itinerary.BusItineraryHaltaddBusHalt(UUID id, String name, BusItineraryHalt.BusItineraryHaltType type)Add a bus halt inside the bus itinerary.(package private) BusItineraryHaltaddBusHalt(UUID id, String name, BusItineraryHalt.BusItineraryHaltType type, int insertToIndex)Add a bus halt inside the bus itinerary.BusItineraryHaltaddBusHalt(UUID id, BusItineraryHalt.BusItineraryHaltType type)Add a bus halt inside the bus itinerary.BusItineraryHaltaddBusHalt(BusItineraryHalt.BusItineraryHaltType type)Add a bus halt inside the bus itinerary.(package private) booleanaddBusHalt(BusItineraryHalt halt, int insertToIndex)Add the given bus halt in this itinerary.booleanaddRoadSegment(RoadSegment segment)Add a road segment inside the bus itinerary.booleanaddRoadSegment(RoadSegment segment, boolean autoConnectHalts)Add a road segment inside the bus itinerary.booleanaddRoadSegments(RoadPath segments)Add road segments inside the bus itinerary.booleanaddRoadSegments(RoadPath segments, boolean autoConnectHalts)Add road segments inside the bus itinerary.booleanaddRoadSegments(RoadPath segments, boolean autoConnectHalts, boolean enableLoopAutoBuild)Add road segments inside the bus itinerary.Iterator<BusItineraryHalt>busHaltIterator()Replies the list of the bus halts of the bus itinerary.Iterable<BusItineraryHalt>busHalts()Replies the list of the bus halts of the bus itinerary.protected Rectangle2dcalcBounds()Compute the bounds of this element.protected voidcheckPrimitiveValidity()Check if the validity of this primitive is correctly set and change its values if necessary.booleancontains(BusItineraryHalt bushalt)Replies if the given bus halt is inside this bus itinerary.booleancontains(RoadSegment segment)Replies if the given segment is inside this bus itinerary.BusItineraryHaltgetBusHalt(String name)Replies the bus halt with the specified name.BusItineraryHaltgetBusHalt(String name, Comparator<String> nameComparator)Replies the bus halt with the specified name.BusItineraryHaltgetBusHalt(UUID uuid)Replies the bus halt with the specified uuid.BusItineraryHaltgetBusHaltAt(int index)Replies the halt at the specified index.Map<BusItineraryHalt,org.eclipse.xtext.xbase.lib.Pair<Integer,Double>>getBusHaltBinding()Replies the binding informations for all the bus halts of this itinerary.List<BusItineraryHalt>getBusHaltsOnSegment(RoadSegment segment)Replies the bus halts on the given segment.BusNetworkgetBusNetwork()Replies the bus network in which this primitive is.doublegetDistanceBetweenBusHalts(int firsthaltIndex, int lasthaltIndex)Replies the distance between two bus halt.Class<? extends BusItineraryHalt>getElementType()Replies the class of the elements in this iterable object.static StringgetFirstFreeBusItineraryName(BusLine busline)Replies a bus itinerary name that was not exist in the specified bus line.intgetInvalidBusHaltCount()Replies the count of valid bus halts into this itinerary.doublegetLength()Replies the length of this itinerary.BusItineraryHaltgetNearestBusHalt(double x, double y)Replies the nearest bus halt to the given point.BusItineraryHaltgetNearestBusHalt(GeoLocationPoint point)Replies the nearest bus halt to the given point.BusItineraryHaltgetNearestBusHalt(Point2D<?,?> point)Replies the nearest bus halt to the given point.RoadSegmentgetNearestRoadSegment(double x, double y)Replies the nearest road segment from this itinerary to the given point.RoadSegmentgetNearestRoadSegment(GeoLocationPoint point)Replies the nearest road segment from this itinerary to the given point.RoadSegmentgetNearestRoadSegment(Point2D<?,?> point)Replies the nearest road segment from this itinerary to the given point.RoadPathgetRoadPath()Replies a road path that is containing all road segments of this itinerary when they are correctly connected.intgetRoadPathCount()Replies the number of road-path clusters for this itinerary.Collection<RoadPath>getRoadPaths()Replies the unconnected road paths which are used by this bus itinerary.RoadSegmentgetRoadSegmentAt(int index)Replies the segment at the specified index.intgetRoadSegmentCount()Replies the count of road segments into this itinerary.Direction1DgetRoadSegmentDirection(int idxSegment)Replies the direction of the itinerary along the road segment at the specified index.Shape2d<?>getShape()Replies the shape of this this element.intgetTroneonCount()Replies the count of troneon.doublegetTroneonLength(int troneonIndex)Replies the distance between two bus halt.intgetValidBusHaltCount()Replies the count of valid bus halts into this itinerary.booleanhasBusHaltOnSegment(RoadSegment segment)Replies if the given segment has a bus halt on it.intindexInParent()Replies the index of this primitive in its parent.intindexOf(BusItineraryHalt bushalt)Replies the index of the specified bus halt.intindexOf(RoadSegment segment)Replies the index of the first occurrence of the specified road segment.BusItineraryHaltinsertBusHaltAfter(BusItineraryHalt afterHalt, String name, BusItineraryHalt.BusItineraryHaltType type)Insert newHalt after afterHalt in the ordered list ofBusItineraryHalt.BusItineraryHaltinsertBusHaltAfter(BusItineraryHalt afterHalt, UUID id, String name, BusItineraryHalt.BusItineraryHaltType type)Insert newHalt after afterHalt in the ordered list ofBusItineraryHalt.BusItineraryHaltinsertBusHaltAfter(BusItineraryHalt afterHalt, UUID id, BusItineraryHalt.BusItineraryHaltType type)Insert newHalt after afterHalt in the ordered list ofBusItineraryHalt.BusItineraryHaltinsertBusHaltBefore(BusItineraryHalt beforeHalt, String name, BusItineraryHalt.BusItineraryHaltType type)Insert newHalt before beforeHalt in the ordered list ofBusItineraryHalt.BusItineraryHaltinsertBusHaltBefore(BusItineraryHalt beforeHalt, UUID id, String name, BusItineraryHalt.BusItineraryHaltType type)Insert newHalt before beforeHalt in the ordered list ofBusItineraryHalt.BusItineraryHaltinsertBusHaltBefore(BusItineraryHalt beforeHalt, UUID id, BusItineraryHalt.BusItineraryHaltType type)Insert newHalt before beforeHalt in the ordered list ofBusItineraryHalt.voidinvert()Invert the order of this itinerary.Iterator<BusItineraryHalt>iterator()intlastIndexOf(RoadSegment segment)Replies the index of the last occurrence of the specified road segment.voidonBusPrimitiveChanged(BusChangeEvent event)Invoked each time the bus primitive changed (excepts for graphical attributes).voidonBusPrimitiveShapeChanged(BusChangeEvent event)Invoked each time the bus primitive topology changed.voidonRoadSegmentAdded(RoadNetwork network, RoadSegment segment)Invoked when a road segment was added.voidonRoadSegmentChanged(RoadNetwork network, RoadSegment segment)Invoked when a road segment was changed.voidonRoadSegmentRemoved(RoadNetwork network, RoadSegment segment)Invoked when a road segment was removed.booleanputHaltOnRoad(BusItineraryHalt halt, RoadSegment road)Put the given bus itinerary halt on the nearest point on road.booleanputHaltOnRoad(BusItineraryHalt halt, RoadSegment road, Point2D<?,?> nearPoint)Put the given bus itinerary halt on the nearest point on road depending on nearPoint position.voidputInvalidHaltsOnRoads(BusItineraryHalt... restrictionList)Try to put the invalid halts on the roads traversed by the bus itinerary.voidrebuild(boolean fireEvents)Rebuild the primitive and all the primitive inside.voidremoveAllBusHalts()Remove all the bus halts from the current itinerary.voidremoveAllRoadSegments()Remove all the road segments from the current itinerary.booleanremoveBusHalt(int index)Remove the bus halt at the specified index.booleanremoveBusHalt(String name)Remove the bus halt with the given name.booleanremoveBusHalt(BusItineraryHalt bushalt)Remove a bus bus from this itinerary.booleanremoveRoadSegment(int segmentIndex)Remove a road segment from this itinerary.Set<Integer>removeRoadSegment(RoadSegment segment)Remove a road segment from this itinerary.Set<Integer>removeRoadSegment(RoadSegment segment, boolean tryToReconnect)Remove a road segment from this itinerary.voidresetBoundingBox()Clear the current bounding box to force the computation of it at the next call toBoundedElement2afp.getBoundingBox().voidrevalidate()Check if the validity of this primitive is correctly set and change its values if necessary.Iterable<RoadSegment>roadSegments()Replies the list of the road segments of the bus itinerary.Iterator<RoadSegment>roadSegmentsIterator()Replies the list of the road segments of the bus itinerary.voidsetBusHaltBinding(Map<BusItineraryHalt,org.eclipse.xtext.xbase.lib.Pair<Integer,Float>> binding)Set the binding informations for all the bus halts of this itinerary.voidsetName(String name)Set the name of the element.intsize()Replies the count of map elements inside this container.BusItineraryHalt[]toBusHaltArray()Replies an array of the bus halts inside this itinerary.BusItineraryHalt[]toInvalidBusHaltArray()Replies an array of the invalid bus halts inside this itinerary.voidtoJson(JsonBuffer buffer)Replies the Json representation of this node.Path2dtoPath2D()Replies the path representation of this itinerary.voidtoPath2D(Path2d path)Replies the path representation of this itinerary.BusItineraryHalt[]toValidBusHaltArray()Replies an array of the valid bus halts inside this itinerary.-
Methods inherited from class org.arakhne.afc.gis.bus.network.AbstractBusContainer
bindChangeListener, fireGraphicalAttributeChanged, fireShapeChanged, onBusPrimitiveGraphicalAttributeChanged
-
Methods inherited from class org.arakhne.afc.gis.bus.network.AbstractBusPrimitive
addBusChangeListener, addGISEditableChangeListener, addListener, finalize, fireGraphicalAttributeChanged, firePrimitiveChanged, firePrimitiveChanged, firePrimitiveChanged, fireShapeChanged, fireValidityChanged, fireValidityChangedFor, getColor, getColor, getFlags, getGeoLocation, getInvalidityReason, getRawColor, hasFlag, isReadOnlyObject, isValidPrimitive, onAttributeChanged, rebuild, removeBusChangeListener, removeGISEditableChangeListener, removeListener, setColor, setFlag, setPrimitiveValidity, setReadOnlyObject, setUUID, switchFlag, unsetFlag
-
Methods inherited from class org.arakhne.afc.gis.primitive.AbstractBoundedGISElement
clone, getBoundingBox, setBoundingBox
-
Methods inherited from class org.arakhne.afc.gis.primitive.AbstractGISElement
addAttributeChangeListener, addAttributes, addAttributes, attributes, copyAttributes, flush, freeMemory, getAllAttributeNames, getAllAttributes, getAllAttributesByType, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeAsBool, getAttributeAsDate, getAttributeAsDouble, getAttributeAsEnumeration, getAttributeAsEnumeration, getAttributeAsFloat, getAttributeAsInetAddress, getAttributeAsInt, getAttributeAsJavaClass, getAttributeAsLong, getAttributeAsString, getAttributeAsURI, getAttributeAsURL, getAttributeAsUUID, getAttributeCollection, getAttributeCount, getAttributeObject, getAttributeProvider, getContainer, getGeoId, getName, getTopContainer, getUUID, hasAttribute, hashKey, isEventFirable, onAttributeChangeEvent, removeAllAttributes, removeAttribute, removeAttributeChangeListener, renameAttribute, renameAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setAttributeType, setContainer, setEventFirable, toMap, toMap, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.attrs.collection.AttributeCollection
addAttributeChangeListener, addAttributes, addAttributes, flush, isEventFirable, removeAllAttributes, removeAttribute, removeAttributeChangeListener, renameAttribute, renameAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setAttributeType, setEventFirable
-
Methods inherited from interface org.arakhne.afc.attrs.collection.AttributeProvider
attributes, freeMemory, getAllAttributeNames, getAllAttributes, getAllAttributesByType, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeAsBool, getAttributeAsDate, getAttributeAsDouble, getAttributeAsEnumeration, getAttributeAsEnumeration, getAttributeAsFloat, getAttributeAsInetAddress, getAttributeAsInt, getAttributeAsJavaClass, getAttributeAsLong, getAttributeAsString, getAttributeAsURI, getAttributeAsURL, getAttributeAsUUID, getAttributeCount, getAttributeObject, hasAttribute, toMap, toMap
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.BoundedElement2afp
getBoundingBox
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISContainer
getColor, getName
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISEditable
getName
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISElement
clone, copyAttributes, getName, hashKey
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISPrimitive
getGeoId, getUUID
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
BusItinerary
public BusItinerary(BusLine busline, String name)
Create bus itinerary with attributes stored in memory.- Parameters:
busline- is the line which is containing this itinerary.name- is the name of the new bus itinerary
-
BusItinerary
public BusItinerary(UUID id, BusLine busline, String name)
Create bus itinerary with attributes stored in memory.- Parameters:
id- is the unique identifier of this element, ornullif unknown.busline- is the line which is containing this itinerary.name- is the name of the new bus itinerary- Since:
- 2.0
-
BusItinerary
public BusItinerary(BusLine busline, String name, AttributeCollection attributeProvider)
Create bus itinerary.- Parameters:
busline- is the line which is containing this itinerary.name- is the name of the new bus itineraryattributeProvider- is the attribute provider for this instance.
-
BusItinerary
public BusItinerary(UUID id, BusLine busline, String name, AttributeCollection attributeProvider)
Create bus itinerary.- Parameters:
id- is the unique identifier of this element, ornullif unknown.busline- is the line which is containing this itinerary.name- is the name of the new bus itineraryattributeProvider- is the attribute provider for this instance.- Since:
- 2.0
-
BusItinerary
public BusItinerary(String name)
Create bus itinerary with attributes stored in memory.- Parameters:
name- is the name of the new bus itinerary
-
BusItinerary
public BusItinerary(UUID id, String name)
Create bus itinerary with attributes stored in memory.- Parameters:
id- is the unique identifier of this element, ornullif unknown.name- is the name of the new bus itinerary- Since:
- 2.0
-
BusItinerary
public BusItinerary(String name, AttributeCollection attributeProvider)
Create bus itinerary.- Parameters:
name- is the name of the new bus itineraryattributeProvider- is the attribute provider for this instance.
-
BusItinerary
public BusItinerary(UUID id, String name, AttributeCollection attributeProvider)
Create bus itinerary.- Parameters:
id- is the unique identifier of this element, ornullif unknown.name- is the name of the new bus itineraryattributeProvider- is the attribute provider for this instance.- Since:
- 2.0
-
BusItinerary
public BusItinerary(BusLine busline)
Create bus itinerary with attributes stored in memory.- Parameters:
busline- is the line which is containing this itinerary.
-
BusItinerary
public BusItinerary(UUID id, BusLine busline)
Create bus itinerary with attributes stored in memory.- Parameters:
id- is the unique identifier of this element, ornullif unknown.busline- is the line which is containing this itinerary.- Since:
- 2.0
-
BusItinerary
public BusItinerary(BusLine busline, AttributeCollection attributeProvider)
Create bus itinerary.- Parameters:
busline- is the line which is containing this itinerary.attributeProvider- is the attribute provider for this instance.
-
BusItinerary
public BusItinerary(UUID id, BusLine busline, AttributeCollection attributeProvider)
Create bus itinerary.- Parameters:
id- is the unique identifier of this element, ornullif unknown.busline- is the line which is containing this itinerary.attributeProvider- is the attribute provider for this instance.- Since:
- 2.0
-
BusItinerary
public BusItinerary()
Create bus itinerary with attributes stored in memory.
-
BusItinerary
public BusItinerary(UUID id)
Create bus itinerary with attributes stored in memory.- Parameters:
id- is the unique identifier of this element, ornullif unknown.- Since:
- 2.0
-
BusItinerary
public BusItinerary(AttributeCollection attributeProvider)
Create bus itinerary.- Parameters:
attributeProvider- is the attribute provider for this instance.
-
BusItinerary
public BusItinerary(UUID id, AttributeCollection attributeProvider)
Create bus itinerary.- Parameters:
id- is the unique identifier of this element, ornullif unknown.attributeProvider- is the attribute provider for this instance.- Since:
- 2.0
-
-
Method Detail
-
toJson
@Pure public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObjectReplies the Json representation of this node.- Specified by:
toJsonin interfaceJsonableObject- Overrides:
toJsonin classAbstractBusPrimitive<BusLine>- Parameters:
buffer- the Json buffer.
-
getFirstFreeBusItineraryName
@Pure public static String getFirstFreeBusItineraryName(BusLine busline)
Replies a bus itinerary name that was not exist in the specified bus line.- Parameters:
busline- the line.- Returns:
- a free name
-
rebuild
public void rebuild(boolean fireEvents)
Description copied from interface:BusPrimitiveRebuild the primitive and all the primitive inside. Rebuilding means to reset all the internal values and recompute their values.This function should be invoked when the bus primitive was construct with its flag replied by
AttributeCollection.isEventFirable()set tofalse. This function permits to finalize the construction.In addition, this function automatically invoke
BoundedGISElement.resetBoundingBox()and does the same job asBusPrimitive.revalidate()(but does not invoke it). This function invokesAttributeCollection.setEventFirable(boolean)withtrueas parameter.- Specified by:
rebuildin interfaceBusPrimitive<BusLine>- Parameters:
fireEvents- indicates if the events should be fired.- See Also:
BusPrimitive.rebuild()
-
revalidate
public void revalidate()
Description copied from interface:BusPrimitiveCheck if the validity of this primitive is correctly set and change its values if necessary. This function revalidate also all the primitives inside this primitive.- Specified by:
revalidatein interfaceBusPrimitive<BusLine>- Overrides:
revalidatein classAbstractBusContainer<BusLine,BusItineraryHalt>
-
checkPrimitiveValidity
protected void checkPrimitiveValidity()
Check if the validity of this primitive is correctly set and change its values if necessary. This function DO NOT revalidate the primitives inside this primitive.An itinerary could be invalid if one of the following critera is not true:
- an itinerary must contains one road segment,
- all the road segment are connected in a sequence,
- the count of bus halts must be at least 2,
- each bus halt must be valid,
- the first halt must be a starting bus halt,
- the last halt must be of terminus,
- the other bus halts must not be of type starting bus halt nor terminus,
- each bus halt must be located on a road segment of the itinerary,
- the bus halts must be ordered, no cycle nor go-back is allowed.
- Specified by:
checkPrimitiveValidityin classAbstractBusPrimitive<BusLine>- See Also:
AbstractBusPrimitive.revalidate()
-
getElementType
public Class<? extends BusItineraryHalt> getElementType()
Description copied from interface:InformedIterableReplies the class of the elements in this iterable object.- Specified by:
getElementTypein interfaceInformedIterable<BusItineraryHalt>- Returns:
- the type of the elements.
-
getBusNetwork
@Pure public BusNetwork getBusNetwork()
Description copied from interface:BusPrimitiveReplies the bus network in which this primitive is.- Specified by:
getBusNetworkin interfaceBusPrimitive<BusLine>- Returns:
- the bus network in which this primitive is.
-
setName
public void setName(String name)
Description copied from interface:GISElementSet the name of the element.- Specified by:
setNamein interfaceGISEditable- Specified by:
setNamein interfaceGISElement- Overrides:
setNamein classAbstractGISElement<BusLine,AbstractBusPrimitive<BusLine>>- Parameters:
name- the new name.
-
calcBounds
@Pure protected Rectangle2d calcBounds()
Description copied from class:AbstractBoundedGISElementCompute the bounds of this element. This function does not update the internal attribute replied byAbstractBoundedGISElement.getBoundingBox()- Specified by:
calcBoundsin classAbstractBoundedGISElement<BusLine,AbstractBusPrimitive<BusLine>>- Returns:
- the bounds
-
getShape
public Shape2d<?> getShape()
Description copied from interface:BoundedGISElementReplies the shape of this this element.The bounding box replied by
BoundedElement2afp.getBoundingBox()encloses the replied shape.- Specified by:
getShapein interfaceBoundedGISElement- Returns:
- the shape or
nullif not applicable.
-
resetBoundingBox
public void resetBoundingBox()
Description copied from interface:BoundedGISElementClear the current bounding box to force the computation of it at the next call toBoundedElement2afp.getBoundingBox().- Specified by:
resetBoundingBoxin interfaceBoundedGISElement- Specified by:
resetBoundingBoxin interfaceGISContainer<BusItineraryHalt>- Overrides:
resetBoundingBoxin classAbstractBoundedGISElement<BusLine,AbstractBusPrimitive<BusLine>>
-
toPath2D
@Pure public Path2d toPath2D()
Replies the path representation of this itinerary.- Returns:
- the path.
-
toPath2D
@Pure public void toPath2D(Path2d path)
Replies the path representation of this itinerary.- Parameters:
path- the path to fill.
-
size
@Pure public int size()
Replies the count of map elements inside this container.- Specified by:
sizein interfaceGISContainer<BusItineraryHalt>- Returns:
- the count of map elements inside this container.
- See Also:
for the number of valid halts only.,for the number of invalid halts only.
-
iterator
@Pure public Iterator<BusItineraryHalt> iterator()
- Specified by:
iteratorin interfaceIterable<BusItineraryHalt>
-
getRoadSegmentDirection
@Pure public Direction1D getRoadSegmentDirection(int idxSegment)
Replies the direction of the itinerary along the road segment at the specified index.- Parameters:
idxSegment- is the index of the road segment in the itinerary.- Returns:
- the direction followed on the road segment.
-
invert
public void invert()
Invert the order of this itinerary.This function reverses the direction of the itinerary, ie. the order of the road segments of the itinerary.
This function does not reverse the location of the bus halts on the itinerary. Their locations will be unchanged.
-
hasBusHaltOnSegment
@Pure public boolean hasBusHaltOnSegment(RoadSegment segment)
Replies if the given segment has a bus halt on it.- Parameters:
segment- is the segment to search on.- Returns:
trueif a bus halt was located on the segment, otherwhisefalse
-
getBusHaltsOnSegment
@Pure public List<BusItineraryHalt> getBusHaltsOnSegment(RoadSegment segment)
Replies the bus halts on the given segment.- Parameters:
segment- is the segment to search on.- Returns:
- the list of bus halts.
-
getBusHaltBinding
@Pure public Map<BusItineraryHalt,org.eclipse.xtext.xbase.lib.Pair<Integer,Double>> getBusHaltBinding()
Replies the binding informations for all the bus halts of this itinerary.- Returns:
- the pairs containing the index of the road segment and the curviline position of each bus itinerary halt.
-
setBusHaltBinding
public void setBusHaltBinding(Map<BusItineraryHalt,org.eclipse.xtext.xbase.lib.Pair<Integer,Float>> binding)
Set the binding informations for all the bus halts of this itinerary.- Parameters:
binding- are the pairs containing the index of the road segment and the curviline position of each bus itinerary halt.
-
getLength
@Pure public double getLength()
Replies the length of this itinerary.If the itinerary is valid, replies the distance between the start bus halt and the terminus. If the itinerary is not valid, replies the sum of the road segment lengths.
- Returns:
- the length of the itinerary.
-
getDistanceBetweenBusHalts
@Pure public double getDistanceBetweenBusHalts(int firsthaltIndex, int lasthaltIndex)Replies the distance between two bus halt.- Parameters:
firsthaltIndex- is the index of the first bus halt.lasthaltIndex- is the index of the last bus halt.- Returns:
- the distance in meters between the given bus halts.
-
getTroneonLength
@Pure public double getTroneonLength(int troneonIndex)
Replies the distance between two bus halt. A segment between bus halts is named troneon.- Parameters:
troneonIndex- is the index of the troneon- Returns:
- the distance in meters between the given bus halt and the following one.
-
getTroneonCount
@Pure public int getTroneonCount()
Replies the count of troneon. A segment between bus halts is named troneon.- Returns:
- the count of troneons.
-
getNearestBusHalt
@Pure public final BusItineraryHalt getNearestBusHalt(Point2D<?,?> point)
Replies the nearest bus halt to the given point.- Parameters:
point- the point.- Returns:
- the nearest bus halt or
nullif none was found.
-
getNearestBusHalt
@Pure public final BusItineraryHalt getNearestBusHalt(GeoLocationPoint point)
Replies the nearest bus halt to the given point.- Parameters:
point- the point.- Returns:
- the nearest bus halt or
nullif none was found.
-
getNearestBusHalt
@Pure public BusItineraryHalt getNearestBusHalt(double x, double y)
Replies the nearest bus halt to the given point.- Parameters:
x- x coordinate.y- y coordinate.- Returns:
- the nearest bus halt or
nullif none was found.
-
addBusHalt
public final BusItineraryHalt addBusHalt(String name, BusItineraryHalt.BusItineraryHaltType type)
Add a bus halt inside the bus itinerary.- Parameters:
name- is the name of the bus halttype- is the type of the bus halt.- Returns:
- the added bus halt, otherwise
null
-
addBusHalt
public final BusItineraryHalt addBusHalt(BusItineraryHalt.BusItineraryHaltType type)
Add a bus halt inside the bus itinerary.- Parameters:
type- is the type of the bus halt.- Returns:
- the added bus halt, otherwise
null
-
addBusHalt
public BusItineraryHalt addBusHalt(UUID id, String name, BusItineraryHalt.BusItineraryHaltType type)
Add a bus halt inside the bus itinerary.The insertion index is computed automatically
- Parameters:
id- is the identifier of the bus halt.name- is the name of the bus halttype- is the type of the bus halt.- Returns:
- the added bus halt, otherwise
null
-
addBusHalt
BusItineraryHalt addBusHalt(UUID id, String name, BusItineraryHalt.BusItineraryHaltType type, int insertToIndex)
Add a bus halt inside the bus itinerary.- Parameters:
id- is the identifier of the bus halt.name- is the name of the bus halttype- is the type of the bus halt.insertToIndex- the inserted index- Returns:
- the added bus halt, otherwise
null
-
addBusHalt
public final BusItineraryHalt addBusHalt(UUID id, BusItineraryHalt.BusItineraryHaltType type)
Add a bus halt inside the bus itinerary.- Parameters:
id- is the identifier of the bus halt.type- is the type of the bus halt.- Returns:
- the added bus halt, otherwise
null
-
addBusHalt
boolean addBusHalt(BusItineraryHalt halt, int insertToIndex)
Add the given bus halt in this itinerary.- Parameters:
halt- the halt.insertToIndex- the insertion index.- Returns:
trueif the addition was successful,falseotherwise.
-
insertBusHaltAfter
public BusItineraryHalt insertBusHaltAfter(BusItineraryHalt afterHalt, UUID id, BusItineraryHalt.BusItineraryHaltType type)
Insert newHalt after afterHalt in the ordered list ofBusItineraryHalt.- Parameters:
afterHalt- the halt where insert the new haltid- id of the new halttype- the type of bus halt- Returns:
- the added bus halt, otherwise
null
-
insertBusHaltAfter
public BusItineraryHalt insertBusHaltAfter(BusItineraryHalt afterHalt, String name, BusItineraryHalt.BusItineraryHaltType type)
Insert newHalt after afterHalt in the ordered list ofBusItineraryHalt.- Parameters:
afterHalt- the halt where insert the new haltname- name of the new halttype- the type of bus halt- Returns:
- the added bus halt, otherwise
null
-
insertBusHaltAfter
public BusItineraryHalt insertBusHaltAfter(BusItineraryHalt afterHalt, UUID id, String name, BusItineraryHalt.BusItineraryHaltType type)
Insert newHalt after afterHalt in the ordered list ofBusItineraryHalt.- Parameters:
afterHalt- the halt where insert the new haltid- id of the new haltname- name of the new halttype- the type of bus halt- Returns:
- the added bus halt, otherwise
null
-
insertBusHaltBefore
public BusItineraryHalt insertBusHaltBefore(BusItineraryHalt beforeHalt, String name, BusItineraryHalt.BusItineraryHaltType type)
Insert newHalt before beforeHalt in the ordered list ofBusItineraryHalt.- Parameters:
beforeHalt- the halt where insert the new haltname- name of the new halttype- the type of bus halt- Returns:
- the added bus halt, otherwise
null
-
insertBusHaltBefore
public BusItineraryHalt insertBusHaltBefore(BusItineraryHalt beforeHalt, UUID id, BusItineraryHalt.BusItineraryHaltType type)
Insert newHalt before beforeHalt in the ordered list ofBusItineraryHalt.- Parameters:
beforeHalt- the halt where insert the new haltid- id of the new halttype- the type of bus halt- Returns:
- the added bus halt, otherwise
null
-
insertBusHaltBefore
public BusItineraryHalt insertBusHaltBefore(BusItineraryHalt beforeHalt, UUID id, String name, BusItineraryHalt.BusItineraryHaltType type)
Insert newHalt before beforeHalt in the ordered list ofBusItineraryHalt.- Parameters:
beforeHalt- the halt where insert the new haltid- id of the new haltname- name of the new halttype- the type of bus halt- Returns:
- the added bus halt, otherwise
null
-
removeAllBusHalts
public void removeAllBusHalts()
Remove all the bus halts from the current itinerary.
-
removeBusHalt
public boolean removeBusHalt(BusItineraryHalt bushalt)
Remove a bus bus from this itinerary.- Parameters:
bushalt- is the bus halt to remove.- Returns:
trueif the bus halt was successfully removed, otherwisefalse
-
removeBusHalt
public boolean removeBusHalt(String name)
Remove the bus halt with the given name.- Parameters:
name- is the name of the bus halt to remove.- Returns:
trueif the bus halt was successfully removed, otherwisefalse
-
removeBusHalt
public boolean removeBusHalt(int index)
Remove the bus halt at the specified index.- Parameters:
index- is the index of the bus halt to remove.- Returns:
trueif the bus halt was successfully removed, otherwisefalse
-
getValidBusHaltCount
@Pure public int getValidBusHaltCount()
Replies the count of valid bus halts into this itinerary.- Returns:
- the count of valid bus halts into this itinerary.
- See Also:
for the number of invalid and valid halts.,for the number of invalid halts only.
-
getInvalidBusHaltCount
@Pure public int getInvalidBusHaltCount()
Replies the count of valid bus halts into this itinerary.- Returns:
- the count of valid bus halts into this itinerary.
- See Also:
for the number of invalid and valid halts.,for the number of valid halts only.
-
indexOf
@Pure public int indexOf(BusItineraryHalt bushalt)
Replies the index of the specified bus halt.- Parameters:
bushalt- is the bus halt to search for.- Returns:
- the index or
-1if it was not found.
-
indexOf
@Pure public int indexOf(RoadSegment segment)
Replies the index of the first occurrence of the specified road segment.- Parameters:
segment- the segment.- Returns:
- the index or
-1if it was not found.
-
lastIndexOf
@Pure public int lastIndexOf(RoadSegment segment)
Replies the index of the last occurrence of the specified road segment.- Parameters:
segment- the segment.- Returns:
- the index or
-1if it was not found.
-
indexInParent
@Pure public int indexInParent()
Description copied from class:AbstractBusPrimitiveReplies the index of this primitive in its parent.- Specified by:
indexInParentin classAbstractBusPrimitive<BusLine>- Returns:
- the index of this primitive in its parent.
-
contains
@Pure public boolean contains(BusItineraryHalt bushalt)
Replies if the given bus halt is inside this bus itinerary.- Parameters:
bushalt- is the bus halt to search for.- Returns:
trueif the bus halt is inside the itinerary, otherwisefalse
-
contains
@Pure public boolean contains(RoadSegment segment)
Replies if the given segment is inside this bus itinerary.- Parameters:
segment- is the road segment to search for.- Returns:
trueif the road segment is inside the itinerary, otherwisefalse
-
getBusHaltAt
@Pure public BusItineraryHalt getBusHaltAt(int index)
Replies the halt at the specified index.- Parameters:
index- the index.- Returns:
- a bus halt
-
getBusHalt
@Pure public BusItineraryHalt getBusHalt(String name)
Replies the bus halt with the specified name.- Parameters:
name- is the desired name- Returns:
- a bus halt or
null
-
getBusHalt
@Pure public BusItineraryHalt getBusHalt(UUID uuid)
Replies the bus halt with the specified uuid.- Parameters:
uuid- the identifier.- Returns:
- BusItineraryHalt or
null
-
getBusHalt
@Pure public BusItineraryHalt getBusHalt(String name, Comparator<String> nameComparator)
Replies the bus halt with the specified name.- Parameters:
name- is the desired namenameComparator- is used to compare the names.- Returns:
- a bus halt or
null
-
busHaltIterator
@Pure public Iterator<BusItineraryHalt> busHaltIterator()
Replies the list of the bus halts of the bus itinerary.- Returns:
- a list of bus halts
-
busHalts
@Pure public Iterable<BusItineraryHalt> busHalts()
Replies the list of the bus halts of the bus itinerary.- Returns:
- a list of bus halts
-
toBusHaltArray
@Pure public BusItineraryHalt[] toBusHaltArray()
Replies an array of the bus halts inside this itinerary. This function copy the internal data structures into the array.- Returns:
- an array of the bus halts inside this itinerary.
-
toInvalidBusHaltArray
@Pure public BusItineraryHalt[] toInvalidBusHaltArray()
Replies an array of the invalid bus halts inside this itinerary. This function copy the internal data structures into the array.- Returns:
- an array of the invalid bus halts inside this itinerary.
-
toValidBusHaltArray
@Pure public BusItineraryHalt[] toValidBusHaltArray()
Replies an array of the valid bus halts inside this itinerary. This function copy the internal data structures into the array.- Returns:
- an array of the invalid bus halts inside this itinerary.
-
getNearestRoadSegment
@Pure public final RoadSegment getNearestRoadSegment(double x, double y)
Replies the nearest road segment from this itinerary to the given point.- Parameters:
x- x coordinate.y- y coordinate- Returns:
- the nearest road segment or
nullif none was found.
-
getNearestRoadSegment
@Pure public final RoadSegment getNearestRoadSegment(GeoLocationPoint point)
Replies the nearest road segment from this itinerary to the given point.- Parameters:
point- the point- Returns:
- the nearest road segment or
nullif none was found.
-
getNearestRoadSegment
@Pure public RoadSegment getNearestRoadSegment(Point2D<?,?> point)
Replies the nearest road segment from this itinerary to the given point.- Parameters:
point- the point.- Returns:
- the nearest road segment or
nullif none was found.
-
addRoadSegment
public final boolean addRoadSegment(RoadSegment segment)
Add a road segment inside the bus itinerary.This function is equivalent to
addRoadSegment(RoadSegment, boolean)with the boolean parameter equals totrue.This function try to connect the invalid itinerary halts to the added road segments.
This function ignores the automatic building of the loops.
- Parameters:
segment- is the segment to add.- Returns:
trueif the segment was added, otherwisefalse- See Also:
addRoadSegments(RoadPath),addRoadSegment(RoadSegment, boolean),addRoadSegments(RoadPath, boolean)
-
addRoadSegment
public final boolean addRoadSegment(RoadSegment segment, boolean autoConnectHalts)
Add a road segment inside the bus itinerary.This function ignores the automatic building of the loops.
- Parameters:
segment- is the segment to add.autoConnectHalts- indicates if the invalid itinery halts are trying to be connected to the added segment. IftrueputInvalidHaltsOnRoads(BusItineraryHalt...)is invoked.- Returns:
trueif the segment was added, otherwisefalse- See Also:
addRoadSegment(RoadSegment),addRoadSegments(RoadPath),addRoadSegments(RoadPath, boolean),putInvalidHaltsOnRoads(BusItineraryHalt...)
-
addRoadSegments
public final boolean addRoadSegments(RoadPath segments)
Add road segments inside the bus itinerary.This function is equivalent to
addRoadSegments(RoadPath, boolean)with the boolean parameter equals totrue.This function try to connect the invalid itinerary halts to the added road segments.
This function ignores the automatic building of the loops.
- Parameters:
segments- are the segments to add.- Returns:
trueif the segment was added, otherwisefalse- See Also:
addRoadSegment(RoadSegment),addRoadSegment(RoadSegment, boolean),addRoadSegments(RoadPath, boolean),putInvalidHaltsOnRoads(BusItineraryHalt...)
-
addRoadSegments
public final boolean addRoadSegments(RoadPath segments, boolean autoConnectHalts)
Add road segments inside the bus itinerary.This function ignores the automatic building of the loops.
- Parameters:
segments- is the segment to add.autoConnectHalts- indicates if the invalid itinery halts are trying to be connected to the added segments. IftrueputInvalidHaltsOnRoads(BusItineraryHalt...)is invoked.- Returns:
trueif the segment was added, otherwisefalse.- Since:
- 4.0
- See Also:
addRoadSegment(RoadSegment),addRoadSegments(RoadPath),addRoadSegment(RoadSegment, boolean),putInvalidHaltsOnRoads(BusItineraryHalt...)
-
addRoadSegments
public boolean addRoadSegments(RoadPath segments, boolean autoConnectHalts, boolean enableLoopAutoBuild)
Add road segments inside the bus itinerary.- Parameters:
segments- is the segment to add.autoConnectHalts- indicates if the invalid itinery halts are trying to be connected to the added segments. IftrueputInvalidHaltsOnRoads(BusItineraryHalt...)is invoked.enableLoopAutoBuild- indicates if the automatic building of loop is enabled.- Returns:
trueif the segment was added, otherwisefalse.- Since:
- 4.0
- See Also:
addRoadSegment(RoadSegment),addRoadSegments(RoadPath),addRoadSegment(RoadSegment, boolean),putInvalidHaltsOnRoads(BusItineraryHalt...)
-
putInvalidHaltsOnRoads
public void putInvalidHaltsOnRoads(BusItineraryHalt... restrictionList)
Try to put the invalid halts on the roads traversed by the bus itinerary. This function is automatically invoked byaddRoadSegments(RoadPath),addRoadSegment(RoadSegment), and byaddRoadSegments(RoadPath, boolean),addRoadSegment(RoadSegment, boolean)when the boolean parameter istrue.This function traverses all the candidate halts and tries to find the nearest road segment. If one was found, the bus halt is associated to the road segment. A bus itinerary halt is a candidate iff:
- it is invalid; and
- it is binded to a valid bus stop; and
- the size of restrictionList is zero; or
- the list restrictionList contains the halt.
- Parameters:
restrictionList- is the list of the bus itinerary halts that can be binded.- Since:
- 4.0
-
putHaltOnRoad
public boolean putHaltOnRoad(BusItineraryHalt halt, RoadSegment road)
Put the given bus itinerary halt on the nearest point on road.- Parameters:
halt- is the halt to put on the road.road- is the road.- Returns:
falseif the road was not found; otherwisetrue. If the bus halt is not binded to a valid bus stop, repliestruealso.
-
putHaltOnRoad
public boolean putHaltOnRoad(BusItineraryHalt halt, RoadSegment road, Point2D<?,?> nearPoint)
Put the given bus itinerary halt on the nearest point on road depending on nearPoint position.- Parameters:
halt- is the halt to put on the road.road- is the road.nearPoint- the near point from road- Returns:
falseif the road was not found; otherwisetrue. If the bus halt is not binded to a valid bus stop, repliestruealso.
-
removeAllRoadSegments
public void removeAllRoadSegments()
Remove all the road segments from the current itinerary.All the bus halts will also be removed.
-
removeRoadSegment
public boolean removeRoadSegment(int segmentIndex)
Remove a road segment from this itinerary.The bus halts on the segment will also be removed.
- Parameters:
segmentIndex- is the index of the segment to remove.- Returns:
trueif the segment was successfully removed, otherwisefalse
-
removeRoadSegment
public Set<Integer> removeRoadSegment(RoadSegment segment)
Remove a road segment from this itinerary. This function remove all the road segment occurrences.The bus halts on the segments will also be removed.
This function tries to reconnect the paths that are previously attached to the remove segment. See
removeRoadSegment(RoadSegment, boolean)for details.- Parameters:
segment- is the segment to remove.- Returns:
- the collection of the indexes of the removed occurrences; never null.
- See Also:
removeRoadSegment(RoadSegment, boolean)
-
removeRoadSegment
public Set<Integer> removeRoadSegment(RoadSegment segment, boolean tryToReconnect)
Remove a road segment from this itinerary. This function remove all the road segment occurrences.The bus halts on the segments will also be removed.
The parameter tryToReconnect indicates if the function tries to reconnect the paths previously attached to the removed segments.
- Parameters:
segment- is the segment to remove.tryToReconnect- indicates if the path connections should be preserved when possible.- Returns:
- the collection of the indexes of the removed occurrences; never null.
- See Also:
removeRoadSegment(RoadSegment)
-
getRoadSegmentCount
@Pure public int getRoadSegmentCount()
Replies the count of road segments into this itinerary.- Returns:
- the count of road segments into this itinerary.
-
getRoadSegmentAt
@Pure public RoadSegment getRoadSegmentAt(int index)
Replies the segment at the specified index.- Parameters:
index- the index.- Returns:
- a road segment
-
roadSegmentsIterator
@Pure public Iterator<RoadSegment> roadSegmentsIterator()
Replies the list of the road segments of the bus itinerary.- Returns:
- a list of road segments
-
roadSegments
@Pure public Iterable<RoadSegment> roadSegments()
Replies the list of the road segments of the bus itinerary.- Returns:
- a list of road segments
-
getRoadPath
@Pure public RoadPath getRoadPath()
Replies a road path that is containing all road segments of this itinerary when they are correctly connected.Connected Road segments that are covered by the itinerary are put into the same cluster of road segments. If no path between two road segments, covered by the itinerary, cannot be found without discontinuity; the two road segments are inside two different clusters of road segments.
- Returns:
- a road path for this itinerary, or
nullif the road segments for this itinerary ar not well connected.
-
getRoadPaths
@Pure public Collection<RoadPath> getRoadPaths()
Replies the unconnected road paths which are used by this bus itinerary.Connected Road segments that are covered by the itinerary are put into the same cluster of road segments. If no path between two road segments, covered by the itinerary, cannot be found without discontinuity; the two road segments are inside two different clusters of road segments.
- Returns:
- a set of road paths for this itinerary.
-
getRoadPathCount
@Pure public int getRoadPathCount()
Replies the number of road-path clusters for this itinerary.Connected Road segments that are covered by the itinerary are put into the same cluster of road segments. If no path between two road segments, covered by the itinerary, cannot be found without discontinuity; the two road segments are inside two different clusters of road segments.
- Returns:
- the number of road-path clusters.
-
onBusPrimitiveChanged
public void onBusPrimitiveChanged(BusChangeEvent event)
Description copied from interface:BusChangeListenerInvoked each time the bus primitive changed (excepts for graphical attributes).- Specified by:
onBusPrimitiveChangedin interfaceBusChangeListener- Overrides:
onBusPrimitiveChangedin classAbstractBusContainer<BusLine,BusItineraryHalt>- Parameters:
event- the event.
-
onBusPrimitiveShapeChanged
public void onBusPrimitiveShapeChanged(BusChangeEvent event)
Description copied from interface:BusChangeListenerInvoked each time the bus primitive topology changed.A bus network topology is composed of the bus lines, the bus itineraries, the bus stops and the bus stations.
- Specified by:
onBusPrimitiveShapeChangedin interfaceBusChangeListener- Overrides:
onBusPrimitiveShapeChangedin classAbstractBusContainer<BusLine,BusItineraryHalt>- Parameters:
event- the event.
-
onRoadSegmentAdded
public void onRoadSegmentAdded(RoadNetwork network, RoadSegment segment)
Description copied from interface:RoadNetworkListenerInvoked when a road segment was added.- Specified by:
onRoadSegmentAddedin interfaceRoadNetworkListener- Parameters:
network- is the network that changed.segment- is the added segment.
-
onRoadSegmentChanged
public void onRoadSegmentChanged(RoadNetwork network, RoadSegment segment)
Description copied from interface:RoadNetworkListenerInvoked when a road segment was changed.- Specified by:
onRoadSegmentChangedin interfaceRoadNetworkListener- Parameters:
network- is the network that changed.segment- is the changed segment.
-
onRoadSegmentRemoved
public void onRoadSegmentRemoved(RoadNetwork network, RoadSegment segment)
Description copied from interface:RoadNetworkListenerInvoked when a road segment was removed.- Specified by:
onRoadSegmentRemovedin interfaceRoadNetworkListener- Parameters:
network- is the network that changed.segment- is the removed segment.
-
-