Interface Link
-
- All Superinterfaces:
Comparable<Edge>
,Edge
,Serializable
- All Known Implementing Classes:
LinkImpl
public interface Link extends Edge
Link interface which extends the Edge interface with a unique id (not all edges are links) as well as an external id- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getExternalId()
Collect the external idlong
getLinkId()
Return id of this instance.boolean
hasExternalId()
Returns whether the external Id has been setLinkSegment
registerLinkSegment(LinkSegment linkSegment, boolean directionAB)
Register linkSegment.void
setExternalId(Object externalId)
Set the external id-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.planit.utils.graph.Edge
addInputProperty, getEdgeSegmentAB, getEdgeSegmentBA, getId, getInputProperty, getLength, getName, getVertexA, getVertexB
-
-
-
-
Method Detail
-
registerLinkSegment
LinkSegment registerLinkSegment(LinkSegment linkSegment, boolean directionAB) throws PlanItException
Register linkSegment. If there already exists a linkSegment for that direction it should be replaced and returned- Parameters:
linkSegment
- the link segment to be registereddirectionAB
- direction of travel- Returns:
- the replaced LinkSegment
- Throws:
PlanItException
- thrown if there is an error
-
getLinkId
long getLinkId()
Return id of this instance. This id is expected to be generated using the org.planit.utils.misc.IdGenerator- Returns:
- linkId
-
setExternalId
void setExternalId(Object externalId)
Set the external id- Parameters:
externalId
- the external id to set
-
getExternalId
Object getExternalId()
Collect the external id- Returns:
- externalID
-
hasExternalId
boolean hasExternalId()
Returns whether the external Id has been set- Returns:
- true if the external Id has been set, false otherwise
-
-