//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2018 Saxonica Limited. // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package net.sf.saxon.expr.sort; /** * An AtomicComparer used for sorting values that are known to be instances of xs:decimal (including xs:integer), * It also supports a separate method for getting a collation key to test equality of items */ public class DecimalSortComparer extends ComparableAtomicValueComparer { private static DecimalSortComparer THE_INSTANCE = new DecimalSortComparer(); public static DecimalSortComparer getDecimalSortComparerInstance() { return THE_INSTANCE; } private DecimalSortComparer() { } /** * Create a string representation of this AtomicComparer that can be saved in a compiled * package and used to reconstitute the AtomicComparer when the package is reloaded * * @return a string representation of the AtomicComparer */ @Override public String save() { return "DecSC"; } }