code: public WizardPage getPreviousPage(WizardPage page) {
          int index = pages.indexOf(page);
          if (index == 0 || index == -1) {
              // first page or page not found
              return null;
          }
  
          logger.debug("Returning previous page...");
          return (WizardPage)pages.get(index - 1);
      }
docs: {@inheritDoc}