01 
02 /*
03  *  JScripter Emulation 1.0 - To Script Java
04  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.jscripter.org>
05  *  
06  *  This program is free software: you can redistribute it and/or modify
07  *  it under the terms of the GNU Affero General Public License as published by
08  *  the Free Software Foundation, either version 3 of the License, or
09  *  (at your option) any later version.
10  *  
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU Affero General Public License for more details.
15  *  
16  *  You should have received a copy of the GNU Affero General Public License
17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 package org.jscripter.emu.java.lang;
21 
22 /**
23  * <p>Emulates a standard <tt>java.lang</tt> interface or class with the same simple 
24  * name as this one.</p>
25  * <p>This interface or class is only used internally by JS re-compiler implementations.</p>
26  * <p>Please refer to <a href="http://java.sun.com/docs/">the Java API Standards</a> for detail description of the original class or interface.</p>
27  * 
28  * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
29  * 
30  * @javascript Re-compilers must redirect the resolution of the Java interface or class to this one.
31  */
32 public abstract class Number implements org.jscripter.emu.java.io.Serializable
33 {
34     /**
35      * <p>Returns the value of this {@link Number} as a byte primitive.</p>
36      * @return The primitive byte value.
37      * @since 1.0
38      * @javascript Re-compilers must report error on end-users directly using this method.
39      * A re-compiler simply replaces an invocation of this abstract method with the current {@link Number}
40      * involving rounding or truncation necessarily.
41      */
42     public abstract byte byteValue();
43     /**
44      * <p>Returns the value of this {@link Number} as a short primitive.</p>
45      * @return The primitive short value.
46      * @since 1.0
47      * @javascript Re-compilers must report error on end-users directly using this method.
48      * A re-compiler simply replaces an invocation of this abstract method with the current {@link Number}
49      * involving rounding or truncation necessarily.
50      */
51     public abstract short shortValue();
52     /**
53      * <p>Returns the value of this {@link Number} as an int primitive.</p>
54      * @return The primitive int value.
55      * @since 1.0
56      * @javascript Re-compilers must report error on end-users directly using this method.
57      * A re-compiler simply replaces an invocation of this abstract method with the current {@link Number}.
58      * involving rounding or truncation necessarily.
59      */
60     public abstract int intValue();
61     /**
62      * <p>Returns the value of this {@link Number} as a long primitive.</p>
63      * @return The primitive long value.
64      * @since 1.0
65      * @javascript Re-compilers must report error on end-users directly using this method.
66      * A re-compiler simply replaces an invocation of this abstract method with the current {@link Number}.
67      * involving rounding necessarily.
68      */
69     public abstract long longValue();
70     /**
71      * <p>Returns the value of this {@link Number} as a float primitive.</p>
72      * @return The primitive float value.
73      * @since 1.0
74      * @javascript Re-compilers must report error on end-users directly using this method.
75      * A re-compiler simply replaces an invocation of this abstract method with the current {@link Number}.
76      * involving rounding necessarily.
77      */
78     public abstract float floatValue();
79     /**
80      * <p>Returns the value of this {@link Number} as a long primitive.</p>
81      * @return The primitive double value.
82      * @since 1.0
83      * @javascript Re-compilers must report error on end-users directly using this method.
84      * A re-compiler simply replaces an invocation of this abstract method with the current {@link Number}.
85      */
86     public abstract double doubleValue();
87 }