primitive list collections
This commit is contained in:
parent
2f5ef3480b
commit
fd70f654b5
@ -2,6 +2,8 @@ package com.baeldung.list.primitive;
|
|||||||
|
|
||||||
import com.google.common.primitives.ImmutableIntArray;
|
import com.google.common.primitives.ImmutableIntArray;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
|
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -13,6 +15,18 @@ public class PrimitiveCollections {
|
|||||||
int[] primitives = new int[] {5, 10, 0, 2};
|
int[] primitives = new int[] {5, 10, 0, 2};
|
||||||
|
|
||||||
guavaPrimitives(primitives);
|
guavaPrimitives(primitives);
|
||||||
|
|
||||||
|
TIntArrayList tList = new TIntArrayList(primitives);
|
||||||
|
|
||||||
|
cern.colt.list.IntArrayList coltList = new cern.colt.list.IntArrayList(primitives);
|
||||||
|
|
||||||
|
IntArrayList fastUtilList = new IntArrayList(primitives);
|
||||||
|
|
||||||
|
System.out.println(tList);
|
||||||
|
|
||||||
|
System.out.println(coltList);
|
||||||
|
|
||||||
|
System.out.println(fastUtilList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user