X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FDescription.java;h=99082a52f76ee34ccb2e84e59045710794fb4556;hb=b9716bc7ee492882e4643c9365971fef3761989f;hp=6be70625c0286fca3ec914da8bd3a7ca93726b7e;hpb=ba1af51214a8ea2de62b84cd23b6145173c71752;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Description.java b/src/main/java/org/ldk/structs/Description.java index 6be70625..99082a52 100644 --- a/src/main/java/org/ldk/structs/Description.java +++ b/src/main/java/org/ldk/structs/Description.java @@ -22,17 +22,6 @@ public class Description extends CommonBase { if (ptr != 0) { bindings.Description_free(ptr); } } - /** - * Checks if two Descriptions 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(Description b) { - boolean ret = bindings.Description_eq(this.ptr, b == null ? 0 : b.ptr & ~1); - this.ptrs_to.add(b); - return ret; - } - /** * Creates a copy of the Description */ @@ -44,6 +33,25 @@ public class Description extends CommonBase { return ret_hu_conv; } + /** + * Checks if two Descriptions contain equal inner contents. + */ + public long hash() { + long ret = bindings.Description_hash(this.ptr); + return ret; + } + + /** + * Checks if two Descriptions 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(Description b) { + boolean ret = bindings.Description_eq(this.ptr, b == null ? 0 : b.ptr & ~1); + this.ptrs_to.add(b); + return ret; + } + /** * Creates a new `Description` if `description` is at most 1023 __bytes__ long, * returns `CreationError::DescriptionTooLong` otherwise