Package hu.u_szeged.nbo.res_alloc.model.container

Examples of hu.u_szeged.nbo.res_alloc.model.container.ResourceContainer


  }
 
  private void loadResources(String filename)
  throws FileNotFoundException, IOException {
    try {
      ResourceContainer resources = new ResourceContainer(model);
      StringTokenizer tokenizer = this.openFile(filename);
     
      //ignore header fields
      tokenizer.nextToken();
      tokenizer.nextToken();
     
      while (tokenizer.hasMoreTokens()) {
        Resource resource = new Resource();
        int id = Integer.parseInt(tokenizer.nextToken());
        resource.setId(id);
        int fare = Integer.parseInt(tokenizer.nextToken());
        resource.setFare(fare);
       
        resources.putResource(id, resource);
      }
     
      model.setResourceContainer(resources);
    }
    catch (FileNotFoundException e) {
View Full Code Here

TOP

Related Classes of hu.u_szeged.nbo.res_alloc.model.container.ResourceContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.