EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.scheduler.processes.impl]

COVERAGE SUMMARY FOR SOURCE FILE [PreemptiveProcess.java]

nameclass, %method, %block, %line, %
PreemptiveProcess.java0%   (0/1)0%   (0/6)0%   (0/55)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PreemptiveProcess0%   (0/1)0%   (0/6)0%   (0/55)0%   (0/13)
PreemptiveProcess (SchedulerModel, ISchedulableProcess): void 0%   (0/1)0%   (0/8)0%   (0/3)
createNewInstance (ISchedulableProcess): IActiveProcess 0%   (0/1)0%   (0/14)0%   (0/3)
getTimeslice (): ITimeSlice 0%   (0/1)0%   (0/3)0%   (0/1)
passTimeProcessing (double): void 0%   (0/1)0%   (0/8)0%   (0/3)
setTimeSlice (ITimeSlice): void 0%   (0/1)0%   (0/4)0%   (0/2)
toString (): String 0%   (0/1)0%   (0/18)0%   (0/1)

1package de.uka.ipd.sdq.scheduler.processes.impl;
2 
3import de.uka.ipd.sdq.probfunction.math.util.MathTools;
4import de.uka.ipd.sdq.scheduler.ISchedulableProcess;
5import de.uka.ipd.sdq.scheduler.SchedulerModel;
6import de.uka.ipd.sdq.scheduler.processes.IActiveProcess;
7import de.uka.ipd.sdq.scheduler.timeslice.ITimeSlice;
8 
9public class PreemptiveProcess extends ActiveProcess {
10 
11        private ITimeSlice timeslice = null;
12        
13        public PreemptiveProcess(SchedulerModel model, ISchedulableProcess process) {
14                super(model, process);
15        }
16        
17        @Override
18        protected void passTimeProcessing(double passedTime) {
19                super.passTimeProcessing(passedTime);
20                timeslice.substractTime(passedTime);
21        }
22        
23        public ITimeSlice getTimeslice(){
24                return this.timeslice;
25        }
26        
27        public void setTimeSlice(ITimeSlice timeslice) {
28                this.timeslice = timeslice;
29        }
30        
31        @Override
32        public String toString() {
33                return super.toString() + " (" + MathTools.round( timeslice.getRemainingTime(), 0.1) +")";
34        }
35        
36        @Override
37        public IActiveProcess createNewInstance(ISchedulableProcess process) {
38                PreemptiveProcess p = new PreemptiveProcess(getModel(), process);
39                p.timeslice = this.timeslice.clone();
40                return p;
41        }
42}

[all classes][de.uka.ipd.sdq.scheduler.processes.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov