public class DefaultPath extends DefaultLink implements Path
DefaultLink.Builder
AbstractProjectableModel.AnnotationDriverData
Link.State, Link.Type
NO_DRIVER, NO_DRIVER_SERVICE
Constructor and Description |
---|
DefaultPath(ProviderId providerId,
List<Link> links,
Weight cost,
Annotations... annotations)
Creates a path from the specified source and destination using the
supplied list of links.
|
Modifier and Type | Method and Description |
---|---|
double |
cost()
Returns the path cost as a unit-less value.
|
boolean |
equals(Object obj) |
int |
hashCode() |
List<Link> |
links()
Returns sequence of links comprising the path.
|
String |
toString() |
Weight |
weight()
Returns the path cost as an weight instance.
|
builder, dst, isExpected, src, state, type
as, asData, bindAndCheckDriver, bindDriver, driver, driverService, is, locateDriver, setDriverService
providerId
annotations
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
annotations
providerId
as, is, project
public DefaultPath(ProviderId providerId, List<Link> links, Weight cost, Annotations... annotations)
providerId
- provider identitylinks
- contiguous links that comprise the pathcost
- unit-less path costannotations
- optional key/value annotationspublic List<Link> links()
Path
public double cost()
Path
public Weight weight()
Path
public String toString()
toString
in class DefaultLink
public int hashCode()
hashCode
in class DefaultLink
public boolean equals(Object obj)
equals
in class DefaultLink