Skip to content

Commit a1f3288

Browse files
committed
Javadoc
1 parent 1d7b5ca commit a1f3288

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/main/java/org/apache/commons/text/similarity/IntersectionSimilarity.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private TinyBag(final int initialCapacity) {
8282
/**
8383
* Adds a new element to the bag, incrementing its count in the underlying map.
8484
*
85-
* @param object the object to add
85+
* @param object the object to add.
8686
*/
8787
private void add(final T object) {
8888
map.computeIfAbsent(object, k -> new BagCount()).count++;
@@ -91,7 +91,7 @@ private void add(final T object) {
9191
/**
9292
* Returns a Set view of the mappings contained in this bag.
9393
*
94-
* @return The Set view
94+
* @return The Set view.
9595
*/
9696
private Set<Entry<T, BagCount>> entrySet() {
9797
return map.entrySet();
@@ -101,8 +101,8 @@ private Set<Entry<T, BagCount>> entrySet() {
101101
* Returns the number of occurrence of the given element in this bag by
102102
* looking up its count in the underlying map.
103103
*
104-
* @param object the object to search for
105-
* @return The number of occurrences of the object, zero if not found
104+
* @param object the object to search for.
105+
* @return The number of occurrences of the object, zero if not found.
106106
*/
107107
private int getCount(final Object object) {
108108
return map.getOrDefault(object, BagCount.ZERO).count;
@@ -111,7 +111,7 @@ private int getCount(final Object object) {
111111
/**
112112
* Gets the number of unique elements in the bag.
113113
*
114-
* @return The unique element size
114+
* @return The unique element size.
115115
*/
116116
private int uniqueElementSize() {
117117
return map.size();
@@ -122,10 +122,10 @@ private int uniqueElementSize() {
122122
* Computes the intersection between two sets. This is the count of all the elements
123123
* that are within both sets.
124124
*
125-
* @param <T> the type of the elements in the set
126-
* @param setA the set A
127-
* @param setB the set B
128-
* @return The intersection
125+
* @param <T> the type of the elements in the set.
126+
* @param setA the set A.
127+
* @param setB the set B.
128+
* @return The intersection of A and B.
129129
*/
130130
private static <T> int getIntersection(final Set<T> setA, final Set<T> setB) {
131131
int intersection = 0;
@@ -149,8 +149,8 @@ private static <T> int getIntersection(final Set<T> setA, final Set<T> setB) {
149149
* that will include duplicates in the intersect and union.
150150
* </p>
151151
*
152-
* @param converter the converter used to create the elements from the characters
153-
* @throws IllegalArgumentException if the converter is null
152+
* @param converter the converter used to create the elements from the characters.
153+
* @throws IllegalArgumentException if the converter is null.
154154
*/
155155
public IntersectionSimilarity(final Function<CharSequence, Collection<T>> converter) {
156156
if (converter == null) {
@@ -162,10 +162,10 @@ public IntersectionSimilarity(final Function<CharSequence, Collection<T>> conver
162162
/**
163163
* Calculates the intersection of two character sequences passed as input.
164164
*
165-
* @param left first character sequence
166-
* @param right second character sequence
167-
* @return The intersection result
168-
* @throws IllegalArgumentException if either input sequence is {@code null}
165+
* @param left first character sequence.
166+
* @param right second character sequence.
167+
* @return The intersection result.
168+
* @throws IllegalArgumentException if either input sequence is {@code null}.
169169
*/
170170
@Override
171171
public IntersectionResult apply(final CharSequence left, final CharSequence right) {
@@ -210,9 +210,9 @@ public IntersectionResult apply(final CharSequence left, final CharSequence righ
210210
* Computes the intersection between two bags. This is the sum of the minimum
211211
* count of each element that is within both sets.
212212
*
213-
* @param bagA the bag A
214-
* @param bagB the bag B
215-
* @return The intersection
213+
* @param bagA the bag A.
214+
* @param bagB the bag B.
215+
* @return The intersection of A and B.
216216
*/
217217
private int getIntersection(final TinyBag bagA, final TinyBag bagB) {
218218
int intersection = 0;
@@ -229,8 +229,8 @@ private int getIntersection(final TinyBag bagA, final TinyBag bagB) {
229229
* Converts the collection to a bag. The bag will contain the count of each element
230230
* in the collection.
231231
*
232-
* @param objects the objects
233-
* @return The bag
232+
* @param objects the objects.
233+
* @return The bag.
234234
*/
235235
private TinyBag toBag(final Collection<T> objects) {
236236
final TinyBag bag = new TinyBag(objects.size());

0 commit comments

Comments
 (0)