Class DefaultDisjointPath

    • Constructor Detail

      • DefaultDisjointPath

        public DefaultDisjointPath​(ProviderId providerId,
                                   DefaultPath path1,
                                   DefaultPath path2)
        Creates a disjoint path pair from two default paths.
        Parameters:
        providerId - provider identity
        path1 - primary path
        path2 - backup path
      • DefaultDisjointPath

        public DefaultDisjointPath​(ProviderId providerId,
                                   DefaultPath path1)
        Creates a disjoint path pair from single default paths.
        Parameters:
        providerId - provider identity
        path1 - primary path
    • Method Detail

      • links

        public java.util.List<Link> links()
        Description copied from interface: Path
        Returns sequence of links comprising the path.
        Specified by:
        links in interface Path
        Overrides:
        links in class DefaultPath
        Returns:
        list of links
      • cost

        public double cost()
        Description copied from interface: Path
        Returns the path cost as a unit-less value.
        Specified by:
        cost in interface Path
        Overrides:
        cost in class DefaultPath
        Returns:
        unit-less path cost
      • weight

        public Weight weight()
        Description copied from interface: Path
        Returns the path cost as an weight instance.
        Specified by:
        weight in interface Path
        Overrides:
        weight in class DefaultPath
        Returns:
        weight path cost
      • backup

        public Path backup()
        Description copied from interface: DisjointPath
        Gets secondary path.
        Specified by:
        backup in interface DisjointPath
        Returns:
        secondary path, or null if there is no secondary path available.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class DefaultPath