File tree Expand file tree Collapse file tree
src/test/java/com/baeldung/collections/stack
main/java/com/baeldung/collections/convertarrayprimitives
test/java/com/baeldung/collections/convertarrayprimitives Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111- [ Performance of contains() in a HashSet vs ArrayList] ( https://www.baeldung.com/java-hashset-arraylist-contains-performance )
1212- [ Fail-Safe Iterator vs Fail-Fast Iterator] ( https://www.baeldung.com/java-fail-safe-vs-fail-fast-iterator )
1313- [ Quick Guide to the Java Stack] ( https://www.baeldung.com/java-stack )
14- - [ Convert an Array of Primitives to a List] ( https://www.baeldung.com/java-primitive-array-to-list )
1514- [ A Guide to BitSet in Java] ( https://www.baeldung.com/java-bitset )
1615- [ Get the First Key and Value From a HashMap] ( https://www.baeldung.com/java-hashmap-get-first-entry )
1716- [ Performance of removeAll() in a HashSet] ( https://www.baeldung.com/java-hashset-removeall-performance )
17+ - More articles: [[ <-- prev]] ( /core-java-modules/core-java-collections-2 ) [[ next -->]] ( /core-java-modules/core-java-collections-4 )
Original file line number Diff line number Diff line change 1- package com .baeldung .stack ;
1+ package com .baeldung .collections . stack ;
22
33import org .junit .Test ;
44
Original file line number Diff line number Diff line change @@ -12,4 +12,5 @@ This module contains articles about Java collections
1212- [ Defining a Char Stack in Java] ( https://www.baeldung.com/java-char-stack )
1313- [ Guide to the Java Queue Interface] ( https://www.baeldung.com/java-queue )
1414- [ An Introduction to Synchronized Java Collections] ( https://www.baeldung.com/java-synchronized-collections )
15- - [[ More -->]] ( /core-java-modules/core-java-collections-2 )
15+ - [ Convert an Array of Primitives to a List] ( https://www.baeldung.com/java-primitive-array-to-list )
16+ - More articles: [[ next -->]] ( /core-java-modules/core-java-collections-2 )
Original file line number Diff line number Diff line change 2525 <artifactId >jmh-generator-annprocess</artifactId >
2626 <version >${jmh-generator.version} </version >
2727 </dependency >
28+ <dependency >
29+ <groupId >org.apache.commons</groupId >
30+ <artifactId >commons-lang3</artifactId >
31+ <version >${commons-lang3.version} </version >
32+ </dependency >
2833 </dependencies >
2934
3035</project >
Original file line number Diff line number Diff line change 1- package com .baeldung .collections .iterators ;
1+ package com .baeldung .collections .convertarrayprimitives ;
22
3- import java .util .List ;
43import java .util .ArrayList ;
54import java .util .Arrays ;
5+ import java .util .List ;
66import java .util .stream .Collectors ;
77import java .util .stream .IntStream ;
8- import com . google . common . primitives . Ints ;
8+
99import org .apache .commons .lang3 .ArrayUtils ;
1010
11+ import com .google .common .primitives .Ints ;
12+
1113public class ConvertPrimitivesArrayToList {
1214
1315 public static void failConvert () {
Original file line number Diff line number Diff line change 1- package com .baeldung .collections .iterators ;
1+ package com .baeldung .collections .convertarrayprimitives ;
2+
3+ import static org .junit .Assert .assertEquals ;
24
3- import java .util .List ;
4- import java .util .ArrayList ;
55import java .util .Arrays ;
6- import java .util .stream .Collectors ;
7- import com .google .common .primitives .Ints ;
8- import org .junit .Test ;
96
10- import static org .junit .Assert . assertEquals ;
7+ import org .junit .Test ;
118
129public class ConvertPrimitivesArrayToListUnitTest {
1310
You can’t perform that action at this time.
0 commit comments