#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
__jni_bindgen! {
public enum ChronoUnit ("java/time/temporal/ChronoUnit") extends crate::java::lang::Enum, implements crate::java::time::temporal::TemporalUnit {
#[cfg(any(feature = "all", all(feature = "java-time-temporal-ChronoUnit")))]
pub fn values<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ObjectArray<crate::java::time::temporal::ChronoUnit, crate::java::lang::Throwable>>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/time/temporal/ChronoUnit\0", "values\0", "()[Ljava/time/temporal/ChronoUnit;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-time-temporal-ChronoUnit")))]
pub fn valueOf<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/time/temporal/ChronoUnit\0", "valueOf\0", "(Ljava/lang/String;)Ljava/time/temporal/ChronoUnit;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-time-Duration")))]
pub fn getDuration<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::Duration>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/ChronoUnit\0", "getDuration\0", "()Ljava/time/Duration;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn isDurationEstimated<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/ChronoUnit\0", "isDurationEstimated\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn isDateBased<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/ChronoUnit\0", "isDateBased\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn isTimeBased<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/ChronoUnit\0", "isTimeBased\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-time-temporal-Temporal")))]
pub fn isSupportedBy<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::time::temporal::Temporal>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/ChronoUnit\0", "isSupportedBy\0", "(Ljava/time/temporal/Temporal;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-time-temporal-Temporal")))]
pub fn addTo<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::time::temporal::Temporal>>, arg1: i64) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::Temporal>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __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/time/temporal/ChronoUnit\0", "addTo\0", "(Ljava/time/temporal/Temporal;J)Ljava/time/temporal/Temporal;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-time-temporal-Temporal")))]
pub fn between<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::time::temporal::Temporal>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::time::temporal::Temporal>>) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/ChronoUnit\0", "between\0", "(Ljava/time/temporal/Temporal;Ljava/time/temporal/Temporal;)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn toString<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/time/temporal/ChronoUnit\0", "toString\0", "()Ljava/lang/String;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn CENTURIES<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "CENTURIES\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn DAYS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "DAYS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn DECADES<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "DECADES\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn ERAS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "ERAS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn FOREVER<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "FOREVER\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn HALF_DAYS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "HALF_DAYS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn HOURS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "HOURS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn MICROS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "MICROS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn MILLENNIA<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "MILLENNIA\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn MILLIS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "MILLIS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn MINUTES<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "MINUTES\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn MONTHS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "MONTHS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn NANOS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "NANOS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn SECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "SECONDS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn WEEKS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "WEEKS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-time-temporal-ChronoUnit"))]
pub fn YEARS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::time::temporal::ChronoUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/time/temporal/ChronoUnit\0", "YEARS\0", "Ljava/time/temporal/ChronoUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
}
}