1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
11 * Number of attempts to retry payment path failures for an [`Invoice`].
13 * Note that this is the number of *path* failures, not full payment retries. For multi-path
14 * payments, if this is less than the total number of paths, we will never even retry all of the
17 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
18 public class RetryAttempts extends CommonBase {
19 RetryAttempts(Object _dummy, long ptr) { super(ptr); }
20 @Override @SuppressWarnings("deprecation")
21 protected void finalize() throws Throwable {
23 if (ptr != 0) { bindings.RetryAttempts_free(ptr); }
27 long ret = bindings.RetryAttempts_get_a(this.ptr);
31 public void set_a(long val) {
32 bindings.RetryAttempts_set_a(this.ptr, val);
36 * Constructs a new RetryAttempts given each field
38 public static RetryAttempts of(long a_arg) {
39 long ret = bindings.RetryAttempts_new(a_arg);
40 if (ret >= 0 && ret <= 4096) { return null; }
41 RetryAttempts ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RetryAttempts(null, ret); }
42 ret_hu_conv.ptrs_to.add(ret_hu_conv);
47 long ret = bindings.RetryAttempts_clone_ptr(this.ptr);
52 * Creates a copy of the RetryAttempts
54 public RetryAttempts clone() {
55 long ret = bindings.RetryAttempts_clone(this.ptr);
56 if (ret >= 0 && ret <= 4096) { return null; }
57 RetryAttempts ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RetryAttempts(null, ret); }
58 ret_hu_conv.ptrs_to.add(this);
63 * Checks if two RetryAttemptss contain equal inner contents.
64 * This ignores pointers and is_owned flags and looks at the values in fields.
65 * Two objects with NULL inner values will be considered "equal" here.
67 public boolean eq(RetryAttempts b) {
68 boolean ret = bindings.RetryAttempts_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
74 * Checks if two RetryAttemptss contain equal inner contents.
77 long ret = bindings.RetryAttempts_hash(this.ptr);