+ /**
+ * Checks if two Routes contain equal inner contents.
+ */
+ public long hash() {
+ long ret = bindings.Route_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two Routes contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(Route b) {
+ boolean ret = bindings.Route_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ this.ptrs_to.add(b);
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof Route)) return false;
+ return this.eq((Route)o);
+ }
+ /**
+ * Returns the total amount of fees paid on this [`Route`].
+ *
+ * This doesn't include any extra payment made to the recipient, which can happen in excess of
+ * the amount passed to [`find_route`]'s `params.final_value_msat`.
+ */
+ public long get_total_fees() {
+ long ret = bindings.Route_get_total_fees(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Returns the total amount paid on this [`Route`], excluding the fees.
+ */
+ public long get_total_amount() {
+ long ret = bindings.Route_get_total_amount(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+