Skip to content

Commit

Permalink
Fix incorrect Javadoc for SortedSetIterable.intersect(),SetIterable.i…
Browse files Browse the repository at this point in the history
…ntersect().
  • Loading branch information
lzcyx committed Aug 19, 2024
1 parent 0041686 commit 2986bf3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ public interface SetIterable<T> extends RichIterable<T>

/**
* Returns the set of all objects that are members of both {@code this} and {@code set}. The intersection of
* [1, 2, 3] and [2, 3, 4] is the set [2, 3]. The output will contain instances from {@code this}, not {@code set}.
* [1, 2, 3] and [2, 3, 4] is the set [2, 3]. The output will contain instances from the smaller of the two sets
* ({@code this} or {@code set}) based on the size. If the sizes are equal, the output will contain instances from
* {@code this}.
* <p>Note: If you need to ensure that the memory references from {@code this} are preserved in the resulting set,
* consider using {@code this.select(that::contains)} instead.</p>
*/
SetIterable<T> intersect(SetIterable<? extends T> set);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ public interface SortedSetIterable<T>

/**
* Returns the set of all objects that are members of both {@code this} and {@code set}. The intersection of
* [1, 2, 3] and [2, 3, 4] is the set [2, 3]. The output will contain instances from {@code this}, not {@code set}.
* [1, 2, 3] and [2, 3, 4] is the set [2, 3]. The output will contain instances from the smaller of the two sets
* ({@code this} or {@code set}) based on the size. If the sizes are equal, the output will contain instances from
* {@code this}.
* <p>Note: If you need to ensure that the memory references from {@code this} are preserved in the resulting set,
* consider using {@code this.select(that::contains)} instead.</p>
*/
@Override
SortedSetIterable<T> intersect(SetIterable<? extends T> set);
Expand Down

0 comments on commit 2986bf3

Please sign in to comment.