Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1. import java.util.ArrayList;
  2.  
  3. public class Job {
  4.    
  5.     private String jobID;
  6.     private double jobMemory;
  7.     private double jobTime;
  8.     ArrayList<PMTInfo> PMT = new ArrayList<>();
  9.     int executionTime;
  10.    
  11.     public Job(String i, double m, double t)
  12.     {
  13.         this.jobID = i;
  14.         this.jobMemory = m;
  15.         this.jobTime = t;
  16.     }
  17.    
  18.     public String toString(){
  19.         return "Job ID:" + jobID + ", \nJob Memory: " + jobMemory + ", \nJob Execution Time: " + jobTime +"milliseconds";
  20.     }
  21.    
  22.     public void setStartTime(long sT){
  23.         jobTime = sT;
  24.     }
  25.    
  26.     public double getStartTime(){
  27.         return jobTime;
  28.     }
  29.    
  30.     public String getID(){
  31.         return jobID;
  32.     }
  33.    
  34.     public double getSize(){
  35.         return jobMemory;
  36.     }
  37.    
  38.     public void setPMT(ArrayList<PMTInfo> incomingPMT){
  39.         PMT = incomingPMT;
  40.     }
  41.    
  42.     public String displayPMT(){
  43.         String PMTList = "";
  44.         for(int i = 0; i < PMT.size(); i++){
  45.             PMTList += PMT.get(i) + "\n";
  46.         }
  47.        
  48.         return PMTList;
  49.     }
  50.    
  51.     public ArrayList<PMTInfo> getPMT(){
  52.         return PMT;
  53.     }
  54.  
  55.     public int getExecutionTime(){
  56.         return executionTime;
  57.     }
  58.    
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement