Package org.onosproject.net
Class DefaultPath
- java.lang.Object
 
- 
- All Implemented Interfaces:
 Annotated,Projectable,Link,NetworkResource,Path,Provided
- Direct Known Subclasses:
 DefaultDisjointPath
public class DefaultPath extends DefaultLink implements Path
Default implementation of a network path. 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class org.onosproject.net.DefaultLink
DefaultLink.Builder 
- 
Nested classes/interfaces inherited from class org.onosproject.net.AbstractProjectableModel
AbstractProjectableModel.AnnotationDriverData 
- 
Nested classes/interfaces inherited from interface org.onosproject.net.Link
Link.State, Link.Type 
 - 
 
- 
Field Summary
- 
Fields inherited from class org.onosproject.net.AbstractProjectableModel
NO_DRIVER, NO_DRIVER_SERVICE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description DefaultPath(ProviderId providerId, java.util.List<Link> links, Weight cost, Annotations... annotations)Creates a path from the specified source and destination using the supplied list of links. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecost()Returns the path cost as a unit-less value.booleanequals(java.lang.Object obj)inthashCode()java.util.List<Link>links()Returns sequence of links comprising the path.java.lang.StringtoString()Weightweight()Returns the path cost as an weight instance.- 
Methods inherited from class org.onosproject.net.DefaultLink
builder, dst, isExpected, src, state, type 
- 
Methods inherited from class org.onosproject.net.AbstractProjectableModel
as, asData, bindAndCheckDriver, bindDriver, driver, driverService, is, locateDriver, setDriverService 
- 
Methods inherited from class org.onosproject.net.AbstractModel
providerId 
- 
Methods inherited from class org.onosproject.net.AbstractAnnotated
annotations 
- 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.onosproject.net.Annotated
annotations 
- 
Methods inherited from interface org.onosproject.net.driver.Projectable
as, is, project 
- 
Methods inherited from interface org.onosproject.net.Provided
providerId 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
DefaultPath
public DefaultPath(ProviderId providerId, java.util.List<Link> links, Weight cost, Annotations... annotations)
Creates a path from the specified source and destination using the supplied list of links.- Parameters:
 providerId- provider identitylinks- contiguous links that comprise the pathcost- unit-less path costannotations- optional key/value annotations
 
 - 
 
- 
Method Detail
- 
links
public java.util.List<Link> links()
Description copied from interface:PathReturns sequence of links comprising the path. 
- 
cost
public double cost()
Description copied from interface:PathReturns the path cost as a unit-less value. 
- 
weight
public Weight weight()
Description copied from interface:PathReturns the path cost as an weight instance. 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classDefaultLink
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classDefaultLink
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classDefaultLink
 
 - 
 
 -