- bindings.RouteHint_free(ptr); super.finalize();
- }
-
- public byte[] get_src_node_id(RouteHint this_ptr) {
- byte[] ret = bindings.RouteHint_get_src_node_id(this_ptr.ptr & ~1);
- this.ptrs_to.add(this_ptr);
- return ret;
- }
-
- public void set_src_node_id(RouteHint this_ptr, byte[] val) {
- bindings.RouteHint_set_src_node_id(this_ptr.ptr & ~1, val);
- this.ptrs_to.add(this_ptr);
- }
-
- public long get_short_channel_id(RouteHint this_ptr) {
- long ret = bindings.RouteHint_get_short_channel_id(this_ptr.ptr & ~1);
- this.ptrs_to.add(this_ptr);
- return ret;
- }
-
- public void set_short_channel_id(RouteHint this_ptr, long val) {
- bindings.RouteHint_set_short_channel_id(this_ptr.ptr & ~1, val);
- this.ptrs_to.add(this_ptr);
- }
-
- public RoutingFees get_fees(RouteHint this_ptr) {
- RoutingFees ret = new RoutingFees(null, bindings.RouteHint_get_fees(this_ptr.ptr & ~1));
- this.ptrs_to.add(this_ptr);
- return ret;
- }
-
- public void set_fees(RouteHint this_ptr, RoutingFees val) {
- bindings.RouteHint_set_fees(this_ptr.ptr & ~1, val.ptr & ~1);
- this.ptrs_to.add(this_ptr);
- this.ptrs_to.add(val);
- }
-
- public short get_cltv_expiry_delta(RouteHint this_ptr) {
- short ret = bindings.RouteHint_get_cltv_expiry_delta(this_ptr.ptr & ~1);
- this.ptrs_to.add(this_ptr);
+ super.finalize();
+ if (ptr != 0) { bindings.RouteHint_free(ptr); }
+ }
+
+ /**
+ * Creates a copy of the RouteHint
+ */
+ public RouteHint clone() {
+ long ret = bindings.RouteHint_clone(this.ptr);
+ if (ret < 1024) { return null; }
+ RouteHint ret_hu_conv = new RouteHint(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two RouteHints contain equal inner contents.
+ */
+ public long hash() {
+ long ret = bindings.RouteHint_hash(this.ptr);