#[cfg(any(feature = "all", feature = "java-util-concurrent-ThreadLocalRandom"))]
__jni_bindgen! {
public class ThreadLocalRandom ("java/util/concurrent/ThreadLocalRandom") extends crate::java::util::Random {
#[cfg(any(feature = "all", all(feature = "java-util-concurrent-ThreadLocalRandom")))]
pub fn current<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::ThreadLocalRandom>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/concurrent/ThreadLocalRandom\0", "current\0", "()Ljava/util/concurrent/ThreadLocalRandom;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
pub fn setSeed<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "setSeed\0", "(J)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn nextInt<'env>(&'env self, arg0: i32, arg1: i32) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextInt\0", "(II)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn nextLong_long<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextLong\0", "(J)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn nextLong_long_long<'env>(&'env self, arg0: i64, arg1: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextLong\0", "(JJ)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn nextDouble_double<'env>(&'env self, arg0: f64) -> __jni_bindgen::std::result::Result<f64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextDouble\0", "(D)D\0");
__jni_env.call_double_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn nextDouble_double_double<'env>(&'env self, arg0: f64, arg1: f64) -> __jni_bindgen::std::result::Result<f64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/ThreadLocalRandom\0", "nextDouble\0", "(DD)D\0");
__jni_env.call_double_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
}
}