View Javadoc

1   /*
2    * $Id: Alternative.java 1540 2011-08-17 13:30:37Z hoheisel $
3    *
4    * Copyright (c) Jun 27, 2006
5    * Fraunhofer Institute for Computer Architecture and Software Technology
6    * See http://www.first.fraunhofer.de for more details.
7    */
8   
9   package net.kwfgrid.gwes.prorater;
10  
11  import net.kwfgrid.gworkflowdl.structure.Transition;
12  import net.kwfgrid.gworkflowdl.structure.OperationCandidate;
13  
14  /**
15   * alternative ProgramExecution of a priorized Transition
16   *
17   * @author Helge Rose'
18   * @version $Id: Alternative.java 1540 2011-08-17 13:30:37Z hoheisel $
19   */
20  class Alternative implements Comparable
21  {
22    OperationCandidate operationCandidate;
23    Transition transition;
24    int priority;
25  
26    Alternative(Transition transition, OperationCandidate candidate, int priority)
27    {
28      this.transition = transition;
29      this.operationCandidate = candidate;
30      this.priority = priority;
31    }
32  
33  
34    public int compareTo(Object o)
35    {
36      return priority - ((Alternative) o).priority;
37    }
38  }