KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > impl > xs > util > XInt


1 /*
2  * Copyright 2001, 2002,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 package org.apache.xerces.impl.xs.util;
18
19 /**
20  * @xerces.internal
21  *
22  * @author Henry Zongaro, IBM
23  * @version $Id: XInt.java,v 1.4 2004/10/06 15:14:50 mrglavas Exp $
24  */

25
26 public final class XInt {
27
28     private int fValue;
29
30     XInt(int value) {
31         fValue = value;
32     }
33
34     public final int intValue() {
35         return fValue;
36     }
37
38     public final short shortValue() {
39         return (short)fValue;
40     }
41
42     public final boolean equals(XInt compareVal) {
43         return (this.fValue == compareVal.fValue);
44     }
45
46     public String JavaDoc toString() {
47         return Integer.toString(fValue);
48     }
49 }
50
Popular Tags