+ super.finalize();
+ if (ptr != 0) { bindings.Route_free(ptr); }
+ }
+
+ /**
+ * The list of routes taken for a single (potentially-)multi-part payment. The pubkey of the
+ * last RouteHop in each path must be the same.
+ * Each entry represents a list of hops, NOT INCLUDING our own, where the last hop is the
+ * destination. Thus, this must always be at least length one. While the maximum length of any
+ * given path is variable, keeping the length of any path to less than 20 should currently
+ * ensure it is viable.
+ */
+ public void set_paths(RouteHop[][] val) {
+ bindings.Route_set_paths(this.ptr, val != null ? Arrays.stream(val).map(val_conv_12 -> val_conv_12 != null ? Arrays.stream(val_conv_12).mapToLong(val_conv_12_conv_10 -> val_conv_12_conv_10 == null ? 0 : val_conv_12_conv_10.ptr & ~1).toArray() : null).toArray(long[][]::new) : null);
+ /* TODO 2 RouteHop[] */;
+ }
+
+ /**
+ * Constructs a new Route given each field
+ */
+ public static Route of(RouteHop[][] paths_arg) {
+ long ret = bindings.Route_new(paths_arg != null ? Arrays.stream(paths_arg).map(paths_arg_conv_12 -> paths_arg_conv_12 != null ? Arrays.stream(paths_arg_conv_12).mapToLong(paths_arg_conv_12_conv_10 -> paths_arg_conv_12_conv_10 == null ? 0 : paths_arg_conv_12_conv_10.ptr & ~1).toArray() : null).toArray(long[][]::new) : null);
+ if (ret < 1024) { return null; }
+ Route ret_hu_conv = new Route(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ /* TODO 2 RouteHop[] */;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a copy of the Route
+ */
+ public Route clone() {
+ long ret = bindings.Route_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ Route ret_hu_conv = new Route(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;