diff --git a/core-java-modules/core-java-collections-list-2/README.md b/core-java-modules/core-java-collections-list-2/README.md index be10a0210c..6192442edd 100644 --- a/core-java-modules/core-java-collections-list-2/README.md +++ b/core-java-modules/core-java-collections-list-2/README.md @@ -10,8 +10,4 @@ - [Java List Initialization in One Line](https://www.baeldung.com/java-init-list-one-line) - [Ways to Iterate Over a List in Java](https://www.baeldung.com/java-iterate-list) - [Flattening Nested Collections in Java](http://www.baeldung.com/java-flatten-nested-collections) -- [Intersection of Two Lists in Java](https://www.baeldung.com/java-lists-intersection) -- [Determine If All Elements Are the Same in a Java List](https://www.baeldung.com/java-list-all-equal) -- [List of Primitive Integer Values in Java](https://www.baeldung.com/java-list-primitive-int) -- [Performance Comparison of Primitive Lists in Java](https://www.baeldung.com/java-list-primitive-performance) -- [Filtering a Java Collection by a List](https://www.baeldung.com/java-filter-collection-by-list) \ No newline at end of file +- [Intersection of Two Lists in Java](https://www.baeldung.com/java-lists-intersection) \ No newline at end of file diff --git a/core-java-modules/core-java-collections-list-2/pom.xml b/core-java-modules/core-java-collections-list-2/pom.xml index d200a3c90c..727de0818a 100644 --- a/core-java-modules/core-java-collections-list-2/pom.xml +++ b/core-java-modules/core-java-collections-list-2/pom.xml @@ -36,41 +36,11 @@ ${lombok.version} provided - - - net.sf.trove4j - trove4j - ${trove4j.version} - - - it.unimi.dsi - fastutil - ${fastutil.version} - - - colt - colt - ${colt.version} - - - - org.openjdk.jmh - jmh-core - ${jmh-core.version} - - - org.openjdk.jmh - jmh-generator-annprocess - ${jmh-core.version} - 4.1 3.8.1 3.11.1 - 3.0.2 - 8.1.0 - 1.2.0 diff --git a/core-java-modules/core-java-collections-list-3/README.md b/core-java-modules/core-java-collections-list-3/README.md new file mode 100644 index 0000000000..267996044c --- /dev/null +++ b/core-java-modules/core-java-collections-list-3/README.md @@ -0,0 +1,11 @@ +========= + +## Core Java Collections List Cookbooks and Examples + +### Relevant Articles: +- [Collections.emptyList() vs. New List Instance](https://www.baeldung.com/java-collections-emptylist-new-list) +- [Copy a List to Another List in Java](http://www.baeldung.com/java-copy-list-to-another) +- [Determine If All Elements Are the Same in a Java List](https://www.baeldung.com/java-list-all-equal) +- [List of Primitive Integer Values in Java](https://www.baeldung.com/java-list-primitive-int) +- [Performance Comparison of Primitive Lists in Java](https://www.baeldung.com/java-list-primitive-performance) +- [Filtering a Java Collection by a List](https://www.baeldung.com/java-filter-collection-by-list) diff --git a/core-java-modules/core-java-collections-list-3/pom.xml b/core-java-modules/core-java-collections-list-3/pom.xml new file mode 100644 index 0000000000..064b65d19e --- /dev/null +++ b/core-java-modules/core-java-collections-list-3/pom.xml @@ -0,0 +1,76 @@ + + 4.0.0 + core-java-collections-list-3 + 0.1.0-SNAPSHOT + core-java-collections-list-3 + jar + + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../../parent-java + + + + + org.apache.commons + commons-collections4 + ${commons-collections4.version} + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + org.assertj + assertj-core + ${assertj.version} + test + + + org.projectlombok + lombok + ${lombok.version} + provided + + + + net.sf.trove4j + trove4j + ${trove4j.version} + + + it.unimi.dsi + fastutil + ${fastutil.version} + + + colt + colt + ${colt.version} + + + + org.openjdk.jmh + jmh-core + ${jmh-core.version} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh-core.version} + + + + + 4.1 + 3.8.1 + 3.11.1 + 3.0.2 + 8.1.0 + 1.2.0 + + diff --git a/core-java-modules/core-java-collections-list-2/src/main/java/com/baeldung/allequalelements/VerifyAllEqualListElements.java b/core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/allequalelements/VerifyAllEqualListElements.java similarity index 100% rename from core-java-modules/core-java-collections-list-2/src/main/java/com/baeldung/allequalelements/VerifyAllEqualListElements.java rename to core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/allequalelements/VerifyAllEqualListElements.java diff --git a/core-java-modules/core-java-collections-list-2/src/main/java/com/baeldung/collection/filtering/Employee.java b/core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/collection/filtering/Employee.java similarity index 100% rename from core-java-modules/core-java-collections-list-2/src/main/java/com/baeldung/collection/filtering/Employee.java rename to core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/collection/filtering/Employee.java diff --git a/core-java-modules/core-java-collections-list/src/main/java/com/baeldung/java/list/CopyListService.java b/core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/java/list/CopyListService.java similarity index 100% rename from core-java-modules/core-java-collections-list/src/main/java/com/baeldung/java/list/CopyListService.java rename to core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/java/list/CopyListService.java diff --git a/core-java-modules/core-java-collections-list/src/main/java/com/baeldung/java/list/Flower.java b/core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/java/list/Flower.java similarity index 100% rename from core-java-modules/core-java-collections-list/src/main/java/com/baeldung/java/list/Flower.java rename to core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/java/list/Flower.java diff --git a/core-java-modules/core-java-collections-list-2/src/main/java/com/baeldung/list/primitive/PrimitiveCollections.java b/core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/list/primitive/PrimitiveCollections.java similarity index 100% rename from core-java-modules/core-java-collections-list-2/src/main/java/com/baeldung/list/primitive/PrimitiveCollections.java rename to core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/list/primitive/PrimitiveCollections.java diff --git a/core-java-modules/core-java-collections-list-2/src/main/java/com/baeldung/list/primitive/PrimitivesListPerformance.java b/core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/list/primitive/PrimitivesListPerformance.java similarity index 100% rename from core-java-modules/core-java-collections-list-2/src/main/java/com/baeldung/list/primitive/PrimitivesListPerformance.java rename to core-java-modules/core-java-collections-list-3/src/main/java/com/baeldung/list/primitive/PrimitivesListPerformance.java diff --git a/core-java-modules/core-java-collections-list-3/src/main/resources/logback.xml b/core-java-modules/core-java-collections-list-3/src/main/resources/logback.xml new file mode 100644 index 0000000000..7d900d8ea8 --- /dev/null +++ b/core-java-modules/core-java-collections-list-3/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + \ No newline at end of file diff --git a/core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/allequalelements/VerifyAllEqualListElementsUnitTest.java b/core-java-modules/core-java-collections-list-3/src/test/java/com/baeldung/allequalelements/VerifyAllEqualListElementsUnitTest.java similarity index 100% rename from core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/allequalelements/VerifyAllEqualListElementsUnitTest.java rename to core-java-modules/core-java-collections-list-3/src/test/java/com/baeldung/allequalelements/VerifyAllEqualListElementsUnitTest.java diff --git a/core-java-modules/core-java-collections-list/src/test/java/com/baeldung/collection/CollectionsEmpty.java b/core-java-modules/core-java-collections-list-3/src/test/java/com/baeldung/collection/CollectionsEmpty.java similarity index 100% rename from core-java-modules/core-java-collections-list/src/test/java/com/baeldung/collection/CollectionsEmpty.java rename to core-java-modules/core-java-collections-list-3/src/test/java/com/baeldung/collection/CollectionsEmpty.java diff --git a/core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/collection/filtering/CollectionFilteringUnitTest.java b/core-java-modules/core-java-collections-list-3/src/test/java/com/baeldung/collection/filtering/CollectionFilteringUnitTest.java similarity index 100% rename from core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/collection/filtering/CollectionFilteringUnitTest.java rename to core-java-modules/core-java-collections-list-3/src/test/java/com/baeldung/collection/filtering/CollectionFilteringUnitTest.java diff --git a/core-java-modules/core-java-collections-list/src/test/java/com/baeldung/java/list/CopyListServiceUnitTest.java b/core-java-modules/core-java-collections-list-3/src/test/java/com/baeldung/java/list/CopyListServiceUnitTest.java similarity index 100% rename from core-java-modules/core-java-collections-list/src/test/java/com/baeldung/java/list/CopyListServiceUnitTest.java rename to core-java-modules/core-java-collections-list-3/src/test/java/com/baeldung/java/list/CopyListServiceUnitTest.java diff --git a/core-java-modules/core-java-collections-list/README.md b/core-java-modules/core-java-collections-list/README.md index 4bc1c5fb57..e83fcce5ff 100644 --- a/core-java-modules/core-java-collections-list/README.md +++ b/core-java-modules/core-java-collections-list/README.md @@ -10,7 +10,5 @@ - [Iterating Backward Through a List](http://www.baeldung.com/java-list-iterate-backwards) - [Remove the First Element from a List](http://www.baeldung.com/java-remove-first-element-from-list) - [How to Find an Element in a List with Java](http://www.baeldung.com/find-list-element-java) -- [Copy a List to Another List in Java](http://www.baeldung.com/java-copy-list-to-another) - [Finding Max/Min of a List or Collection](http://www.baeldung.com/java-collection-min-max) -- [Collections.emptyList() vs. New List Instance](https://www.baeldung.com/java-collections-emptylist-new-list) - [Remove All Occurrences of a Specific Value from a List](https://www.baeldung.com/java-remove-value-from-list) \ No newline at end of file diff --git a/pom.xml b/pom.xml index d7485e1653..4334221bd4 100644 --- a/pom.xml +++ b/pom.xml @@ -395,6 +395,7 @@ core-java-modules/core-java-collections core-java-modules/core-java-collections-list core-java-modules/core-java-collections-list-2 + core-java-modules/core-java-collections-list-3 core-java-modules/core-java-collections-array-list core-java-modules/core-java-collections-set core-java-modules/core-java-concurrency-basic @@ -1123,6 +1124,7 @@ core-java-modules/core-java-collections core-java-modules/core-java-collections-list core-java-modules/core-java-collections-list-2 + core-java-modules/core-java-collections-list-3 core-java-modules/core-java-collections-array-list core-java-modules/core-java-collections-set core-java-modules/core-java-concurrency-basic