public class DefaultDisjointPath extends DefaultPath implements DisjointPath
DefaultLink.Builder
AbstractProjectableModel.AnnotationDriverData
Link.State, Link.Type
NO_DRIVER, NO_DRIVER_SERVICE
Constructor and Description |
---|
DefaultDisjointPath(ProviderId providerId,
DefaultPath path1)
Creates a disjoint path pair from single default paths.
|
DefaultDisjointPath(ProviderId providerId,
DefaultPath path1,
DefaultPath path2)
Creates a disjoint path pair from two default paths.
|
Modifier and Type | Method and Description |
---|---|
Path |
backup()
Gets secondary path.
|
double |
cost()
Returns the path cost as a unit-less value.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.util.List<Link> |
links()
Returns sequence of links comprising the path.
|
Path |
primary()
Gets primary path.
|
boolean |
useBackup()
Deprecated.
|
Weight |
weight()
Returns the path cost as an weight instance.
|
toString
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 DefaultDisjointPath(ProviderId providerId, DefaultPath path1, DefaultPath path2)
providerId
- provider identitypath1
- primary pathpath2
- backup pathpublic DefaultDisjointPath(ProviderId providerId, DefaultPath path1)
providerId
- provider identitypath1
- primary pathpublic java.util.List<Link> links()
Path
links
in interface Path
links
in class DefaultPath
public double cost()
Path
cost
in interface Path
cost
in class DefaultPath
public Weight weight()
Path
weight
in interface Path
weight
in class DefaultPath
public Path primary()
DisjointPath
primary
in interface DisjointPath
public Path backup()
DisjointPath
backup
in interface DisjointPath
public int hashCode()
hashCode
in class DefaultPath
public boolean equals(java.lang.Object obj)
equals
in class DefaultPath
@Deprecated public boolean useBackup()
DisjointPath
useBackup
in interface DisjointPath