Skip to content

Commit

Permalink
Replace TreeSortedMap.newMap() with SortedMaps.mutable.empty().
Browse files Browse the repository at this point in the history
Signed-off-by: Craig P. Motlin <cmotlin@gmail.com>
  • Loading branch information
motlin committed Apr 19, 2022
1 parent 69f9563 commit 40bbb15
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .idea/inspectionProfiles/IDE.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -58,6 +58,7 @@
import org.eclipse.collections.api.factory.Maps;
import org.eclipse.collections.api.factory.Sets;
import org.eclipse.collections.api.factory.SortedBags;
import org.eclipse.collections.api.factory.SortedMaps;
import org.eclipse.collections.api.factory.primitive.BooleanBags;
import org.eclipse.collections.api.factory.primitive.ByteBags;
import org.eclipse.collections.api.factory.primitive.CharBags;
Expand Down Expand Up @@ -630,7 +631,7 @@ public <NK, NV> MutableSortedMap<NK, NV> toSortedMap(
Function<? super T, ? extends NK> keyFunction,
Function<? super T, ? extends NV> valueFunction)
{
return TreeSortedMap.newMap();
return SortedMaps.mutable.empty();
}

@Override
Expand Down
Expand Up @@ -32,6 +32,7 @@
import org.eclipse.collections.api.block.procedure.Procedure;
import org.eclipse.collections.api.block.procedure.Procedure2;
import org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure;
import org.eclipse.collections.api.factory.SortedMaps;
import org.eclipse.collections.api.factory.SortedSets;
import org.eclipse.collections.api.map.sorted.MutableSortedMap;
import org.eclipse.collections.api.ordered.OrderedIterable;
Expand Down Expand Up @@ -67,7 +68,7 @@ public class TreeBag<T>

public TreeBag()
{
this.items = TreeSortedMap.newMap();
this.items = SortedMaps.mutable.empty();
}

private TreeBag(MutableSortedMap<T, Counter> map)
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Goldman Sachs.
* Copyright (c) 2022 Goldman Sachs and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand All @@ -23,6 +23,7 @@ public class MutableSortedMapFactoryImpl implements MutableSortedMapFactory
@Override
public <K, V> MutableSortedMap<K, V> empty()
{
//noinspection SSBasedInspection
return TreeSortedMap.newMap();
}

Expand Down

0 comments on commit 40bbb15

Please sign in to comment.