From a418d1704d5f0ece7e022c13d9301319373b11ba Mon Sep 17 00:00:00 2001 From: yankun <1939810907@qq.com> Date: Fri, 21 Jul 2023 09:55:23 +0800 Subject: [PATCH] fix: javadoc --- .../github/yankun1992/bloom/BloomFilter.java | 18 +++++++++++------- .../yankun1992/bloom/CountingBloomFilter.java | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/fastbloomjvm/src/io/github/yankun1992/bloom/BloomFilter.java b/fastbloomjvm/src/io/github/yankun1992/bloom/BloomFilter.java index e6948f3..b556b63 100644 --- a/fastbloomjvm/src/io/github/yankun1992/bloom/BloomFilter.java +++ b/fastbloomjvm/src/io/github/yankun1992/bloom/BloomFilter.java @@ -24,9 +24,9 @@ * A Bloom filter is a space-efficient probabilistic data structure, conceived by Burton Howard Bloom in 1970, that is * used to test whether an element is a member of a set. False positive matches are possible, but false negatives * are not. - *
- * Reference: Bloom, B. H. (1970). Space/time trade-offs in hash coding with allowable errors. Communications of - * the ACM, 13(7), 422-426. Full text article + * + * Reference: Bloom, B. H. (1970). Space/time trade-offs in hash coding with allowable errors. Communications of + * the ACM, 13(7), 422-426. Full text article */ public class BloomFilter extends NativeLoader implements AutoCloseable { @@ -44,8 +44,9 @@ public int hashes() { /** * Add element to the filter. * + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * * @param element value to add - * @apiNote In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public void addInt(int element) { addInt0(raw, element); @@ -58,8 +59,9 @@ public void addIntBatch(int[] array) { /** * Add element to the filter. * + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * * @param element value to add - * @apiNote In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public void addLong(long element) { addLong0(raw, element); @@ -86,9 +88,10 @@ public void addBytes(byte[] element) { /** * Tests whether an element is present in the filter (subject to the specified false positive rate). * + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * * @param element to test * @return true if element is in this filter. - * @apiNote In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public boolean containsInt(int element) { return containsInt0(raw, element); @@ -97,9 +100,10 @@ public boolean containsInt(int element) { /** * Tests whether an element is present in the filter (subject to the specified false positive rate). * + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * * @param element to test * @return true if element is in this filter. - * @apiNote In Python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public boolean containsLong(long element) { return containsLong0(raw, element); diff --git a/fastbloomjvm/src/io/github/yankun1992/bloom/CountingBloomFilter.java b/fastbloomjvm/src/io/github/yankun1992/bloom/CountingBloomFilter.java index 8989dad..97c43ad 100644 --- a/fastbloomjvm/src/io/github/yankun1992/bloom/CountingBloomFilter.java +++ b/fastbloomjvm/src/io/github/yankun1992/bloom/CountingBloomFilter.java @@ -26,8 +26,8 @@ * insertions and deletions. In a counting Bloom filter, each entry in the Bloom filter is a small counter associated * with a basic Bloom filter bit. *
- * Reference: F. Bonomi, M. Mitzenmacher, R. Panigrahy, S. Singh, and G. Varghese, “An Improved Construction - * for Counting Bloom Filters,” in 14th Annual European Symposium on Algorithms, LNCS 4168, 2006 + * Reference: F. Bonomi, M. Mitzenmacher, R. Panigrahy, S. Singh, and G. Varghese, "An Improved Construction + * for Counting Bloom Filters," in 14th Annual European Symposium on Algorithms, LNCS 4168, 2006 */ public class CountingBloomFilter extends NativeLoader implements AutoCloseable { @@ -45,7 +45,7 @@ public int hashes() { /** * Add element to the filter. * - * @apiNote In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public void addInt(int element) { addInt0(raw, element); @@ -54,7 +54,7 @@ public void addInt(int element) { /** * Remove element from this filter. * - * @apiNote In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public void removeInt(int element) { removeInt0(raw, element); @@ -63,8 +63,9 @@ public void removeInt(int element) { /** * Add element to the filter. * + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * * @param element value to add - * @apiNote In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public void addLong(long element) { addLong0(raw, element); @@ -73,7 +74,7 @@ public void addLong(long element) { /** * Remove element from this filter. * - * @apiNote In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public void removeLong(long element) { removeLong0(raw, element); @@ -110,9 +111,10 @@ public void removeBytes(byte[] element) { /** * Tests whether an element is present in the filter (subject to the specified false positive rate). * + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * * @param element to test * @return true if element is in this filter. - * @apiNote In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public boolean containsInt(int element) { return containsInt0(raw, element); @@ -121,9 +123,10 @@ public boolean containsInt(int element) { /** * Tests whether an element is present in the filter (subject to the specified false positive rate). * + * notice: In python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust + * * @param element to test * @return true if element is in this filter. - * @apiNote In Python API, `add_int` is same as `addLong` in java, because python `int` type is `i64` in Rust */ public boolean containsLong(long element) { return containsLong0(raw, element);