Debian Codegraph @

net/sf/saxon/expr/sort/DecimalSortComparer.java

raw symbols SCIP
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 /**
11 * An AtomicComparer used for sorting values that are known to be instances of xs:decimal (including xs:integer),
12 * It also supports a separate method for getting a collation key to test equality of items
13 */
14
15 public class DecimalSortComparer extends ComparableAtomicValueComparer {
16
17 private static DecimalSortComparer THE_INSTANCE = new DecimalSortComparer();
18
19 public static DecimalSortComparer getDecimalSortComparerInstance() {
20 return THE_INSTANCE;
21 }
22
23 private DecimalSortComparer() {
24 }
25
26 /**
27 * Create a string representation of this AtomicComparer that can be saved in a compiled
28 * package and used to reconstitute the AtomicComparer when the package is reloaded
29 *
30 * @return a string representation of the AtomicComparer
31 */
32 @Override
33 public String save() {
34 return "DecSC";
35 }
36 }
37