01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.xerces.xs.datatypes;
18:
19: import java.math.BigDecimal;
20: import java.math.BigInteger;
21:
22: /**
23: * <p>Interface to expose the value of 'decimal' and related datatypes.</p>
24: *
25: * @author Naela Nissar, IBM
26: *
27: * @version $Id: XSDecimal.java 447250 2006-09-18 05:27:17Z mrglavas $
28: */
29: public interface XSDecimal {
30:
31: /**
32: * @return the <code>BigDecimal</code> representation of this object
33: */
34: public BigDecimal getBigDecimal();
35:
36: /**
37: * @return the <code>BigInteger</code> representation of this object
38: * @exception NumberFormatException if the value cannot be represented as a <code>BigInteger</code>
39: */
40: public BigInteger getBigInteger() throws NumberFormatException;
41:
42: /**
43: * @return the long value representation of this object
44: * @exception NumberFormatException if the value cannot be represented as a <code>long</code>
45: */
46: public long getLong() throws NumberFormatException;
47:
48: /**
49: * @return the int value representation of this object
50: * @exception NumberFormatException if the value cannot be represented as a <code>int</code>
51: */
52: public int getInt() throws NumberFormatException;
53:
54: /**
55: * @return the short value representation of this object
56: * @exception NumberFormatException if the value cannot be represented as a <code>short</code>
57: */
58: public short getShort() throws NumberFormatException;
59:
60: /**
61: * @return the byte value representation of this object
62: * @exception NumberFormatException if the value cannot be represented as a <code>byte</code>
63: */
64: public byte getByte() throws NumberFormatException;
65: }
|