Class NextHop


  • public class NextHop
    extends Object
    Represents a next hop for routing, whose MAC address has already been resolved.
    • Constructor Detail

      • NextHop

        public NextHop​(IpAddress ip,
                       MacAddress mac,
                       NextHopGroupKey group)
        Creates a new next hop.
        Parameters:
        ip - next hop's IP address
        mac - next hop's MAC address
        group - 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object