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 ObjectgetExternalId()Collect the external idlonggetLinkId()Return id of this instance.booleanhasExternalId()Returns whether the external Id has been setLinkSegmentregisterLinkSegment(LinkSegment linkSegment, boolean directionAB)Register linkSegment.voidsetExternalId(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
-
-