Skip to content

Commit

Permalink
fix: javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
yankun1992 committed Jul 21, 2023
1 parent ecaf7c0 commit a418d17
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
18 changes: 11 additions & 7 deletions fastbloomjvm/src/io/github/yankun1992/bloom/BloomFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <br/>
* <b>Reference<b/>: Bloom, B. H. (1970). Space/time trade-offs in hash coding with allowable errors. Communications of
* the ACM, 13(7), 422-426. <a href="http://crystal.uta.edu/~mcguigan/cse6350/papers/Bloom.pdf">Full text article</>
*
* <b>Reference</b>: Bloom, B. H. (1970). Space/time trade-offs in hash coding with allowable errors. Communications of
* the ACM, 13(7), 422-426. <a href="http://crystal.uta.edu/~mcguigan/cse6350/papers/Bloom.pdf"> Full text article</a>
*/
public class BloomFilter extends NativeLoader implements AutoCloseable {

Expand All @@ -44,8 +44,9 @@ public int hashes() {
/**
* Add element to the filter.
*
* <b>notice</b>: 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);
Expand All @@ -58,8 +59,9 @@ public void addIntBatch(int[] array) {
/**
* Add element to the filter.
*
* <b>notice</b>: 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);
Expand All @@ -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).
*
* <b>notice</b>: 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);
Expand All @@ -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).
*
* <b>notice</b>: 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <br/>
* <b>Reference<b/>: 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
* <b>Reference</b>: 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 {

Expand All @@ -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
* <b>notice</b>: 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);
Expand All @@ -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
* <b>notice</b>: 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);
Expand All @@ -63,8 +63,9 @@ public void removeInt(int element) {
/**
* Add element to the filter.
*
* <b>notice</b>: 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);
Expand All @@ -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
* <b>notice</b>: 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);
Expand Down Expand Up @@ -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).
*
* <b>notice</b>: 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);
Expand All @@ -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).
*
* <b>notice</b>: 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);
Expand Down

0 comments on commit a418d17

Please sign in to comment.