Random.h

Go to the documentation of this file.
00001 #ifndef JAVA_UTIL_RANDOM_H
00002 #define JAVA_UTIL_RANDOM_H 1
00003 
00004 #ifndef JAVA_LANG_SYNC_H
00005 #include <java_lang/Sync.h>
00006 #endif /* JAVA_LANG_SYNC_H */
00007 
00008 namespace java {
00009   namespace util {
00010 
00039     class JAVA_UTIL_SPEC Random : virtual public Object {
00040 
00041     public:
00042 
00050       Random();
00051 
00062       Random(jlong seed);
00063 
00083       virtual void setSeed(jlong seed);
00084 
00094       virtual void nextBytes(Array<jbyte>& bytes);
00095 
00110       virtual jint nextInt();
00111 
00167       virtual jint nextInt(jint n);
00168 
00185       virtual jlong nextLong();
00186 
00203       virtual jboolean nextBoolean();
00204 
00240       virtual jfloat nextFloat();
00241 
00281       virtual jdouble nextDouble();
00282 
00323       virtual jdouble nextGaussian();
00324 
00325     protected:
00326 
00351       virtual jint next(jint bits);
00352 
00353     private:
00354 
00355       ObjectRef impl;
00356       REGISTER_MEMBERS;
00357 
00358     };
00359 
00360   } // namespace util
00361 } // namespace java
00362 
00363 #endif /* JAVA_UTIL_RANDOM_H */

Generated on Fri May 16 11:54:43 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3