Java Code Examples for java.util.stream.LambdaTestHelpers#countTo()
The following examples show how to use
java.util.stream.LambdaTestHelpers#countTo() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CollectionAndMapModifyStreamTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 2
Source File: CollectionAndMapModifyStreamTest.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 3
Source File: CollectionAndMapModifyStreamTest.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 4
Source File: CollectionAndMapModifyStreamTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 5
Source File: CollectionAndMapModifyStreamTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 6
Source File: CollectionAndMapModifyStreamTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 7
Source File: CollectionAndMapModifyStreamTest.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 8
Source File: CollectionAndMapModifyStreamTest.java From hottub with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 9
Source File: CollectionAndMapModifyStreamTest.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 10
Source File: CollectionAndMapModifyStreamTest.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 11
Source File: CollectionAndMapModifyStreamTest.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 12
Source File: CollectionAndMapModifyStreamTest.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }
Example 13
Source File: CollectionAndMapModifyStreamTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name = "collections") public Object[][] createCollections() { List<Integer> content = LambdaTestHelpers.countTo(10); List<Collection<Integer>> collections = new ArrayList<>(); collections.add(new ArrayList<>(content)); collections.add(new LinkedList<>(content)); collections.add(new Vector<>(content)); collections.add(new HashSet<>(content)); collections.add(new LinkedHashSet<>(content)); collections.add(new TreeSet<>(content)); Stack<Integer> stack = new Stack<>(); stack.addAll(content); collections.add(stack); collections.add(new PriorityQueue<>(content)); collections.add(new ArrayDeque<>(content)); // Concurrent collections collections.add(new ConcurrentSkipListSet<>(content)); ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); for (Integer i : content) arrayBlockingQueue.add(i); collections.add(arrayBlockingQueue); collections.add(new PriorityBlockingQueue<>(content)); collections.add(new LinkedBlockingQueue<>(content)); collections.add(new LinkedTransferQueue<>(content)); collections.add(new ConcurrentLinkedQueue<>(content)); collections.add(new LinkedBlockingDeque<>(content)); collections.add(new ConcurrentLinkedDeque<>(content)); Object[][] params = new Object[collections.size()][]; for (int i = 0; i < collections.size(); i++) { params[i] = new Object[]{collections.get(i).getClass().getName(), collections.get(i)}; } return params; }