From e36ca664abb49ed5fc49f24d1744bc582e03fbdc Mon Sep 17 00:00:00 2001 From: John Dimeo Date: Mon, 18 May 2020 12:45:28 -0400 Subject: [PATCH] Revert removal of tap() Signed-off-by: John Dimeo --- .../resources/api/map/immutableObjectPrimitiveMap.stg | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eclipse-collections-code-generator/src/main/resources/api/map/immutableObjectPrimitiveMap.stg b/eclipse-collections-code-generator/src/main/resources/api/map/immutableObjectPrimitiveMap.stg index 4976fd273b..a18fa2a122 100644 --- a/eclipse-collections-code-generator/src/main/resources/api/map/immutableObjectPrimitiveMap.stg +++ b/eclipse-collections-code-generator/src/main/resources/api/map/immutableObjectPrimitiveMap.stg @@ -16,6 +16,7 @@ package org.eclipse.collections.api.map.primitive; import org.eclipse.collections.api.block.function.primitive.ToObjectFunction; import org.eclipse.collections.api.block.predicate.primitive.ObjectPredicate; import org.eclipse.collections.api.block.predicate.primitive.Predicate; +import org.eclipse.collections.api.block.procedure.primitive.Procedure; import org.eclipse.collections.api.collection.ImmutableCollection; import org.eclipse.collections.api.collection.primitive.ImmutableCollection; @@ -38,6 +39,15 @@ public interface ImmutableObjectMap\ extends ObjectMap\ @Override ImmutableCollection reject(Predicate predicate); + /** + * @since 9.0. + */ + default ImmutableObjectMap\ tap(Procedure procedure) + { + this.forEach(procedure); + return this; + } + @Override \ ImmutableCollection\ collect(ToObjectFunction\ function);