Package org.planit.utils.graph
Interface Edge
-
- All Superinterfaces:
Comparable<Edge>,Serializable
- All Known Subinterfaces:
Connectoid,Link
- All Known Implementing Classes:
ConnectoidImpl,EdgeImpl,LinkImpl
public interface Edge extends Comparable<Edge>, Serializable
Edge interface connecting two vertices in a non-directional fashion. Each edge has one or two underlying edge segments in a particular direction which may carry additional information for each particular direction of the edge.- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddInputProperty(String key, Object value)Add a property from the original input that is not part of the readily available link membersEdgeSegmentgetEdgeSegmentAB()Edge segment in the direction from A to BEdgeSegmentgetEdgeSegmentBA()Edge segment in the direction from B to AlonggetId()Return id of this instance.ObjectgetInputProperty(String key)Get input property by its keydoublegetLength()Return length of this edge in kmStringgetName()collect the name of the edgeVertexgetVertexA()Vertex A of the edgeVertexgetVertexB()Vertex B of the edge-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
getId
long getId()
Return id of this instance. This id is expected to be generated using the org.planit.utils.misc.IdGenerator- Returns:
- id of this Edge object
-
getLength
double getLength()
Return length of this edge in km- Returns:
- length of this edge in km
-
getVertexA
Vertex getVertexA()
Vertex A of the edge- Returns:
- vertex A
-
getVertexB
Vertex getVertexB()
Vertex B of the edge- Returns:
- vertex B
-
getName
String getName()
collect the name of the edge- Returns:
- the name
-
addInputProperty
void addInputProperty(String key, Object value)
Add a property from the original input that is not part of the readily available link members- Parameters:
key- key (name) of input propertyvalue- value of input property
-
getInputProperty
Object getInputProperty(String key)
Get input property by its key- Parameters:
key- key of input property- Returns:
- value retrieved value of input property
-
getEdgeSegmentAB
EdgeSegment getEdgeSegmentAB()
Edge segment in the direction from A to B- Returns:
- edge segment AB
-
getEdgeSegmentBA
EdgeSegment getEdgeSegmentBA()
Edge segment in the direction from B to A- Returns:
- edge segment BA
-
-