KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > kawa > xml > XInteger


1 // Copyright (c) 2006 Per M.A. Bothner.
2
// This is free software; for specifics see ../../../COPYING.
3

4 package gnu.kawa.xml;
5 import gnu.math.IntNum;
6
7 /** An integer that is an instance of a more specific integer type.
8  * I.e. it has a type annotation and restrictions, in the XML Schema sense.
9  */

10
11 public class XInteger extends IntNum
12 {
13   // Alternatively have a different subclass for each type.
14
private XIntegerType type;
15
16   public XIntegerType getIntegerType ()
17   {
18     return type;
19   }
20
21   XInteger (IntNum value, XIntegerType type)
22   {
23     words = value.words;
24     ival = value.ival;
25     this.type = type;
26   }
27 }
28
Popular Tags