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 87fddfbd0934482364b293ec7ca5c56cee8dc128 Author: Gary Gregory <[email protected]> AuthorDate: Wed Jun 17 20:29:36 2026 +0000 Reduce vertical whitespace. --- .../collections4/collection/IndexedCollection.java | 32 ++++++++-------------- 1 file changed, 12 insertions(+), 20 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 b65acf24a..27eb6451d 100644 --- a/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java +++ b/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java @@ -54,37 +54,30 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> { /** * Creates an {@link IndexedCollection} for a non-unique index. * - * @param <K> the index object type. - * @param <C> the collection type. - * @param coll the decorated {@link Collection}. + * @param <K> the index object type. + * @param <C> the collection type. + * @param coll the decorated {@link Collection}. * @param keyTransformer the {@link Transformer} for generating index keys. * @return the created {@link IndexedCollection}. */ - public static <K, C> IndexedCollection<K, C> nonUniqueIndexedCollection(final Collection<C> coll, - final Transformer<C, K> keyTransformer) { - return new IndexedCollection<>(coll, keyTransformer, - MultiValueMap.<K, C>multiValueMap(new HashMap<>()), - false); + public static <K, C> IndexedCollection<K, C> nonUniqueIndexedCollection(final Collection<C> coll, final Transformer<C, K> keyTransformer) { + return new IndexedCollection<>(coll, keyTransformer, MultiValueMap.<K, C>multiValueMap(new HashMap<>()), false); } /** * Creates an {@link IndexedCollection} for a unique index. * <p> - * If an element is added, which maps to an existing key, an {@link IllegalArgumentException} - * will be thrown. + * If an element is added, which maps to an existing key, an {@link IllegalArgumentException} will be thrown. * </p> * - * @param <K> the index object type. - * @param <C> the collection type. - * @param coll the decorated {@link Collection}. + * @param <K> the index object type. + * @param <C> the collection type. + * @param coll the decorated {@link Collection}. * @param keyTransformer the {@link Transformer} for generating index keys. * @return the created {@link IndexedCollection}. */ - public static <K, C> IndexedCollection<K, C> uniqueIndexedCollection(final Collection<C> coll, - final Transformer<C, K> keyTransformer) { - return new IndexedCollection<>(coll, keyTransformer, - MultiValueMap.<K, C>multiValueMap(new HashMap<>()), - true); + public static <K, C> IndexedCollection<K, C> uniqueIndexedCollection(final Collection<C> coll, final Transformer<C, K> keyTransformer) { + return new IndexedCollection<>(coll, keyTransformer, MultiValueMap.<K, C>multiValueMap(new HashMap<>()), true); } /** The {@link Transformer} for generating index keys. */ @@ -104,8 +97,7 @@ public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> { * @param map map to use as index. * @param uniqueIndex if the index shall enforce uniqueness of index keys. */ - public IndexedCollection(final Collection<C> coll, final Transformer<C, K> keyTransformer, - final MultiMap<K, C> map, final boolean uniqueIndex) { + public IndexedCollection(final Collection<C> coll, final Transformer<C, K> keyTransformer, final MultiMap<K, C> map, final boolean uniqueIndex) { super(coll); this.keyTransformer = keyTransformer; this.index = map;
