KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icl > saxon > number > Numberer


1 package com.icl.saxon.number;
2
3 /**
4   * Interface Numberer supports number formatting. There is a separate
5   * implementation for each language, e.g. Numberer_en for English.
6   * This supports the xsl:number element
7   * @author <A HREF="mailto:mhkay@iclway.co.uk>Michael H. Kay</A>
8   * @version 18 November 1999
9   */

10
11 public interface Numberer {
12
13     /**
14     * Format a number into a string
15     * @param number The number to be formatted
16     * @param picture The format specification. This is a single component of the format attribute
17     * of xsl:number, e.g. "1", "01", "i", or "a"
18     * @param groupSize number of digits per group (0 implies no grouping)
19     * @param groupSeparator string to appear between groups of digits
20     * @param letterValue as defined in xsl:number ("alphabetic" or "traditional" or "")
21     * @return the formatted number
22     */

23
24     public String JavaDoc format(int number, String JavaDoc picture,
25                                  int groupSize, String JavaDoc groupSeparator,
26                                  String JavaDoc letterValue);
27
28 }
29
30 //
31
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
32
// you may not use this file except in compliance with the License. You may obtain a copy of the
33
// License at http://www.mozilla.org/MPL/
34
//
35
// Software distributed under the License is distributed on an "AS IS" basis,
36
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
37
// See the License for the specific language governing rights and limitations under the License.
38
//
39
// The Original Code is: all this file.
40
//
41
// The Initial Developer of the Original Code is
42
// Michael Kay of International Computers Limited (mhkay@iclway.co.uk).
43
//
44
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
45
//
46
// Contributor(s): none.
47
//
48
Popular Tags