01: // Copyright (c) 2006 Per M.A. Bothner.
02: // This is free software; for specifics see ../../../COPYING.
03:
04: package gnu.kawa.xml;
05:
06: import gnu.math.IntNum;
07:
08: /** An integer that is an instance of a more specific integer type.
09: * I.e. it has a type annotation and restrictions, in the XML Schema sense.
10: */
11:
12: public class XInteger extends IntNum {
13: // Alternatively have a different subclass for each type.
14: private XIntegerType type;
15:
16: public XIntegerType getIntegerType() {
17: return type;
18: }
19:
20: XInteger(IntNum value, XIntegerType type) {
21: words = value.words;
22: ival = value.ival;
23: this.type = type;
24: }
25: }
|