Class SimplePR

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class SimplePR
    extends PR
    Utility class that can be used to write simple priority rules as a lambda expression (PR itself is not a functional interface). So in order to express the SPT rule you can now write
     PR spt = new SimplePR("spt", job -> -job.currProcTime());
     
    instead of writing an anonymous inner class:
     PR spt = new PR() {
            @Override
            public double calcPrio(PrioRuleTarget job) {
                    return -job.currProcTime();
            }
     };
     
    Author:
    Torsten Hildebrandt
    See Also:
    Serialized Form