00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef COH_INTEGER16_HPP
00017 #define COH_INTEGER16_HPP
00018 
00019 #include "coherence/lang/compatibility.hpp"
00020 
00021 #include "coherence/lang/Number.hpp"
00022 #include "coherence/lang/Primitive.hpp"
00023 #include "coherence/lang/TypedHandle.hpp"
00024 
00025 COH_OPEN_NAMESPACE2(coherence,lang)
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 class COH_EXPORT Integer16
00034     : public cloneable_spec<Integer16,
00035         extends<Primitive<int16_t> >,
00036         implements<Number, Comparable> >
00037     {
00038     friend class factory<Integer16>;
00039 
00040     
00041 
00042     private:
00043 
00044 
00045 
00046 
00047 
00048         Integer16(int16_t n);
00049 
00050 
00051 
00052 
00053         Integer16(const Integer16& that);
00054 
00055 
00056     
00057 
00058     public:
00059 
00060 
00061 
00062         virtual int16_t getInt16Value() const;
00063 
00064 
00065 
00066 
00067         virtual int32_t getInt32Value() const;
00068 
00069 
00070 
00071 
00072         virtual int64_t getInt64Value() const;
00073 
00074 
00075 
00076 
00077         virtual float32_t getFloat32Value() const;
00078 
00079 
00080 
00081 
00082         virtual float64_t getFloat64Value() const;
00083 
00084 
00085     
00086 
00087     public:
00088 
00089 
00090 
00091         virtual int32_t compareTo(Object::View v) const;
00092 
00093 
00094     
00095 
00096     public:
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105         static Handle valueOf(int16_t n);
00106 
00107 
00108     
00109 
00110     public:
00111 
00112 
00113 
00114         static const int16_t MIN_VALUE = (int16_t) 0x8000;
00115 
00116 
00117 
00118 
00119         static const int16_t MAX_VALUE = 0x7FFF;
00120     };
00121 
00122 COH_CLOSE_NAMESPACE2
00123 
00124 #endif // COH_INTEGER16_HPP