Example #1
0
  /**
   * gets a transport firm with the given company name
   *
   * @param companyName
   * @return
   */
  public TransportFirm getTransportFirm(String companyName) {

    for (TransportFirm t : firms) {
      if (t.getCompany().equals(companyName)) {
        return t;
      }
    }

    // Could not find a transport firm with the given name.
    return null;
  }