1 5 package com.opensymphony.workflow.spi.ejb; 6 7 import com.opensymphony.workflow.spi.Step; 8 9 import java.util.Comparator ; 10 11 12 17 public class StepComparator implements Comparator { 18 20 public int compare(Object o1, Object o2) { 21 Step step1 = (Step) o1; 22 Step step2 = (Step) o2; 23 24 if (step1.getId() > step2.getId()) { 25 return -1; 26 } else if (step1.getId() < step2.getId()) { 27 return 1; 28 } else { 29 return 0; 30 } 31 } 32 } 33 | Popular Tags |