KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xalan > transformer > DecimalToRoman


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /*
17  * $Id: DecimalToRoman.java,v 1.7 2004/02/16 20:41:29 minchau Exp $
18  */

19 package org.apache.xalan.transformer;
20
21 /**
22  * Structure to help in converting integers to roman numerals
23  * @xsl.usage internal
24  */

25 public class DecimalToRoman
26 {
27
28   /**
29    * Constructor DecimalToRoman
30    *
31    *
32    * @param postValue Minimum value for a given range of
33    * roman numbers
34    * @param postLetter Correspoding letter (roman) to postValue
35    * @param preValue Value of last prefixed number within
36    * that same range (i.e. IV if postval is 5 (V))
37    * @param preLetter Correspoding letter(roman) to preValue
38    */

39   public DecimalToRoman(long postValue, String JavaDoc postLetter, long preValue,
40                         String JavaDoc preLetter)
41   {
42
43     this.m_postValue = postValue;
44     this.m_postLetter = postLetter;
45     this.m_preValue = preValue;
46     this.m_preLetter = preLetter;
47   }
48
49   /** Minimum value for a given range of roman numbers */
50   public long m_postValue;
51
52   /** Correspoding letter (roman) to m_postValue */
53   public String JavaDoc m_postLetter;
54
55   /** Value of last prefixed number within that same range */
56   public long m_preValue;
57
58   /** Correspoding letter (roman) to m_preValue */
59   public String JavaDoc m_preLetter;
60 }
61
Popular Tags