12637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin/* 22637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * Copyright (c) 2016 Mockito contributors 32637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * This program is made available under the terms of the MIT License. 42637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin */ 52637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffinpackage org.mockito.internal.invocation; 62637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin 72637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffinimport org.mockito.invocation.Invocation; 82637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin 92637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffinimport java.util.Comparator; 102637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin 112637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin/** 122637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin * Compares invocations based on the sequence number 132637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin */ 142637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffinpublic class InvocationComparator implements Comparator<Invocation> { 152637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin public int compare(Invocation o1, Invocation o2) { 162637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin return Integer.valueOf(o1.getSequenceNumber()).compareTo(o2.getSequenceNumber()); 172637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin } 182637d96c202372854a7c71466ddcc6e90fc4fc53Paul Duffin} 19