code: public int getMaxBW(Node n1, Node n2) {
          int max = Integer.MAX_VALUE;
          for (Link inf : getPath(n1, n2)) {
              if (inf.getCapacity() < max) {
                  max = inf.getCapacity();
              }
              Switch sw = inf.getSwitch();
              if (sw.getCapacity() >= 0 && sw.getCapacity() < max) {
                  //The >= 0 stays for historical reasons
                  max = sw.getCapacity();
              }
  
          }
          return max;
      }
docs: Get the maximal bandwidth available between two nodes.
  
  @param n1    the source node
  @param n2    the destination node
  @return  the bandwidth