New Features.

-Added: ArrayList.of(CLASS, size) function that allows to preallocate
the size of the generic list.
-Updated: ListTests suppressors only suprres what they need to.
-Added: Start of the ConcurrentHashMap implementation (based on Guavas
implementation)

Note that the ConcurrentHashMap implementation is just started not
finished and still needs a lot of work, but the base code - any
subclasses is technically finished.
The implementation is also using linkedMaps to have faster iteration
performance.
This commit is contained in:
2022-04-10 15:49:16 +02:00
parent 103b2407d2
commit 4f98c599df
6 changed files with 889 additions and 7 deletions
@@ -11,7 +11,6 @@ import com.google.common.collect.testing.TestStringListGenerator;
import com.google.common.collect.testing.features.CollectionFeature;
import com.google.common.collect.testing.features.CollectionSize;
import com.google.common.collect.testing.features.ListFeature;
import com.google.common.collect.testing.testers.CollectionSpliteratorTester;
import com.google.common.collect.testing.testers.ListListIteratorTester;
import com.google.common.collect.testing.testers.ListSubListTester;
@@ -78,8 +77,7 @@ public class ObjectListTests extends TestCase
}).named(name).withFeatures(CollectionFeature.ALLOWS_NULL_VALUES, CollectionSize.ANY).createTestSuite();
}
public static Collection<Method> suppressForCopyOnWriteArrayList()
{
return Arrays.asList(ListSubListTester.getSubListOriginalListSetAffectsSubListMethod(), ListSubListTester.getSubListOriginalListSetAffectsSubListLargeListMethod(), ListSubListTester.getSubListSubListRemoveAffectsOriginalLargeListMethod(), ListListIteratorTester.getListIteratorFullyModifiableMethod(), CollectionSpliteratorTester.getSpliteratorNotImmutableCollectionAllowsAddMethod(), CollectionSpliteratorTester.getSpliteratorNotImmutableCollectionAllowsRemoveMethod());
public static Collection<Method> suppressForCopyOnWriteArrayList() {
return Arrays.asList(ListSubListTester.getSubListSubListRemoveAffectsOriginalLargeListMethod(), ListListIteratorTester.getListIteratorFullyModifiableMethod());
}
}