You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2026/08/01 11:50:22 UTC
(commons-collections) branch master updated (acc0f404d -> b8f567cd0)
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
from acc0f404d Javadoc
new 9c272cc66 Javadoc
new 0f4146145 Javadoc
new 3003464ae Javadoc
new b8f567cd0 Javadoc
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../collection/AbstractCollectionDecorator.java | 2 +-
.../collections4/collection/IndexedCollection.java | 8 ++---
.../collection/PredicatedCollection.java | 6 +++-
.../collection/SynchronizedCollection.java | 39 +++++++++++-----------
4 files changed, 30 insertions(+), 25 deletions(-)
(commons-collections) 02/04: Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 0f41461457a52661d596adcac637f68c8244f72c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 1 07:48:24 2026 -0400
Javadoc
---
.../apache/commons/collections4/collection/IndexedCollection.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java b/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
index 312a134cb..c18ca3922 100644
--- a/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
@@ -178,8 +178,8 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> {
* with a key, use {@link #values(Object)}.
* </p>
*
- * @param key key to look up
- * @return element found
+ * @param key key to look up.
+ * @return element found.
* @see #values(Object)
*/
public C get(final K key) {
@@ -218,7 +218,7 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> {
/**
* Removes an object from the index.
*
- * @param object The object to remove
+ * @param object The object to remove.
*/
private void removeFromIndex(final C object) {
index.removeMapping(keyTransformer.apply(object), object);
@@ -269,7 +269,7 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> {
* @param key key to look up.
* @return A collection of elements found, or null if {@code contains(key) == false}.
*/
- @SuppressWarnings("unchecked") // index is a MultiMap which returns a Collection
+ @SuppressWarnings("unchecked") // index is a MultiMap which returns a Collection.
public Collection<C> values(final K key) {
return (Collection<C>) index.get(key);
}
(commons-collections) 01/04: Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 9c272cc6615522afac1a3e6d2c8aca529f08d429
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 1 07:47:53 2026 -0400
Javadoc
---
.../commons/collections4/collection/AbstractCollectionDecorator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java b/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
index 348c19d3a..e6d0f8587 100644
--- a/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
+++ b/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
@@ -53,7 +53,7 @@ import java.util.function.Predicate;
* AbstractListDecorator, to preserve equality behavior, or override equals directly.
* </p>
*
- * @param <E> The type of the elements in the collection
+ * @param <E> The type of the elements in the collection.
* @since 3.0
*/
public abstract class AbstractCollectionDecorator<E>
(commons-collections) 03/04: Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 3003464aefe7f1a81a106d7d19092160703b84e8
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 1 07:49:22 2026 -0400
Javadoc
---
.../commons/collections4/collection/PredicatedCollection.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java b/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java
index 354d1e06b..14e564d34 100644
--- a/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/PredicatedCollection.java
@@ -70,8 +70,10 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
* Create a Builder with a predicate to validate elements against, then add any elements
* to the builder. Elements that fail the predicate will be added to a rejected list.
* Finally, create or decorate a collection using the createPredicated[List,Set,Bag,Queue] methods.
+ * </p>
* <p>
- * An example:
+ * For example:
+ * </p>
* <pre>
* Predicate<String> predicate = NotNullPredicate.notNullPredicate();
* PredicatedCollectionBuilder<String> builder = PredicatedCollection.builder(predicate);
@@ -83,9 +85,11 @@ public class PredicatedCollection<E> extends AbstractCollectionDecorator<E> {
* <p>
* At the end of the code fragment above predicatedList is protected by the predicate supplied
* to the builder, and it contains item1 and item2.
+ * </p>
* <p>
* More elements can be added to the builder once a predicated collection has been created,
* but these elements will not be reflected in already created collections.
+ * </p>
*
* @param <E> the element type.
* @since 4.1
(commons-collections) 04/04: Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit b8f567cd08223b2199d862cee1ddfe4ac63dd3f8
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 1 07:50:17 2026 -0400
Javadoc
---
.../collection/SynchronizedCollection.java | 39 +++++++++++-----------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java b/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java
index cefeddbbd..0a77da8f4 100644
--- a/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/SynchronizedCollection.java
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.apache.commons.collections4.collection;
import java.io.Serializable;
@@ -23,22 +24,22 @@ import java.util.Objects;
import java.util.function.Predicate;
/**
- * Decorates another {@link Collection} to synchronize its behavior
- * for a multithreaded environment.
+ * Decorates another {@link Collection} to synchronize its behavior for a multithreaded environment.
* <p>
* Iterators must be manually synchronized:
* </p>
+ *
* <pre>
* synchronized (coll) {
- * Iterator it = coll.iterator();
- * // do stuff with iterator
+ * Iterator it = coll.iterator();
+ * // do stuff with iterator
* }
* </pre>
* <p>
* This class is Serializable from Commons Collections 3.1.
* </p>
*
- * @param <E> The type of the elements in the collection
+ * @param <E> The type of the elements in the collection.
* @since 3.0
*/
public class SynchronizedCollection<E> implements Collection<E>, Serializable {
@@ -49,10 +50,10 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
/**
* Creates a synchronized collection.
*
- * @param <T> The type of the elements in the collection
- * @param coll The collection to decorate, must not be null
- * @return A new synchronized collection
- * @throws NullPointerException if collection is null
+ * @param <T> The type of the elements in the collection.
+ * @param coll The collection to decorate, must not be null.
+ * @return A new synchronized collection.
+ * @throws NullPointerException if collection is null.
* @since 4.0
*/
public static <T> SynchronizedCollection<T> synchronizedCollection(final Collection<T> coll) {
@@ -68,8 +69,8 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
/**
* Constructs and wraps (not copies).
*
- * @param collection The collection to decorate, must not be null
- * @throws NullPointerException if the collection is null
+ * @param collection The collection to decorate, must not be null.
+ * @throws NullPointerException if the collection is null.
*/
protected SynchronizedCollection(final Collection<E> collection) {
this.collection = Objects.requireNonNull(collection, "collection");
@@ -79,9 +80,9 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
/**
* Constructs and wraps (not copies).
*
- * @param collection The collection to decorate, must not be null
- * @param lock The lock object to use, must not be null
- * @throws NullPointerException if the collection or lock is null
+ * @param collection The collection to decorate, must not be null.
+ * @param lock The lock object to use, must not be null.
+ * @throws NullPointerException if the collection or lock is null.
*/
protected SynchronizedCollection(final Collection<E> collection, final Object lock) {
this.collection = Objects.requireNonNull(collection, "collection");
@@ -126,7 +127,7 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
/**
* Gets the collection being decorated.
*
- * @return The decorated collection
+ * @return The decorated collection.
*/
protected Collection<E> decorated() {
return collection;
@@ -158,14 +159,15 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
/**
* Iterators must be manually synchronized.
+ *
* <pre>
* synchronized (coll) {
- * Iterator it = coll.iterator();
- * // do stuff with iterator
+ * Iterator it = coll.iterator();
+ * // do stuff with iterator
* }
* </pre>
*
- * @return An iterator that must be manually synchronized on the collection
+ * @return An iterator that must be manually synchronized on the collection.
*/
@Override
public Iterator<E> iterator() {
@@ -230,5 +232,4 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
return decorated().toString();
}
}
-
}