KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icl > saxon > sort > TextComparer


1 package com.icl.saxon.sort;
2
3 // Copyright © International Computers Limited 1998
4
// See conditions of use
5

6 /**
7  * A Comparer used for comparing text keys
8  *
9  * @author Michael H. Kay (mhkay@iclway.co.uk)
10  *
11  */

12
13 public abstract class TextComparer extends Comparer {
14
15     public final static int DEFAULT_CASE_ORDER = 0;
16     public final static int LOWERCASE_FIRST = 1;
17     public final static int UPPERCASE_FIRST = 2;
18
19     /**
20     * Set case order
21     * @param caseOrder one of DEFAULT_CASE_ORDER, LOWERCASE_FIRST, or UPPERCASE_FIRST.
22     * Indicates whether upper case letters precede or follow lower case letters in the ordering
23     * @return either this or a different Comparer that will be used to perform the comparisons.
24     * This allows the TextComparer to delegate the comparison to a Comparer dedicated to a
25     * specific case order.
26     */

27
28     public Comparer setCaseOrder(int caseOrder) {
29         return this;
30     }
31
32 }
33
Popular Tags