Package org.onosproject.routing
Class NextHop
- java.lang.Object
-
- org.onosproject.routing.NextHop
-
public class NextHop extends java.lang.Object
Represents a next hop for routing, whose MAC address has already been resolved.
-
-
Constructor Summary
Constructors Constructor Description NextHop(IpAddress ip, MacAddress mac, NextHopGroupKey group)
Creates a new next hop.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
NextHopGroupKey
group()
Returns the next hop group.int
hashCode()
IpAddress
ip()
Returns the next hop's IP address.MacAddress
mac()
Returns the next hop's MAC address.java.lang.String
toString()
-
-
-
Constructor Detail
-
NextHop
public NextHop(IpAddress ip, MacAddress mac, NextHopGroupKey group)
Creates a new next hop.- Parameters:
ip
- next hop's IP addressmac
- next hop's MAC addressgroup
- next hop's group
-
-
Method Detail
-
ip
public IpAddress ip()
Returns the next hop's IP address.- Returns:
- next hop's IP address
-
mac
public MacAddress mac()
Returns the next hop's MAC address.- Returns:
- next hop's MAC address
-
group
public NextHopGroupKey group()
Returns the next hop group.- Returns:
- group
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-