| 1 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 2 | // Copyright (c) 2018 Saxonica Limited. |
| 3 | // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. |
| 4 | // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 | // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. |
| 6 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 7 | |
| 8 | package net.sf.saxon.expr.sort; |
| 9 | |
| 10 | import net.sf.saxon.om.Item; |
| 11 | |
| 12 | import java.io.Serializable; |
| 13 | |
| 14 | /** |
| 15 | * A Comparer used for comparing nodes in document order, or items in merge order |
| 16 | * |
| 17 | * @author Michael H. Kay |
| 18 | */ |
| 19 | |
| 20 | public interface ItemOrderComparer { |
| 21 | |
| 22 | /** |
| 23 | * Compare two objects. |
| 24 | * |
| 25 | * @return <0 if a<b, 0 if a=b, >0 if a>b |
| 26 | */ |
| 27 | |
| 28 | public int compare(Item a, Item b); |
| 29 | |
| 30 | } |
| 31 |