Examples of ZipShortestIterator


Examples of net.emaze.dysfunctional.convolutions.ZipShortestIterator

   
    @Test
    public void emptyCollectionsLeadsToEmptyIterator() {
        List<Integer> ints = new ArrayList<Integer>();
        List<Long> longs = new ArrayList<Long>();
        Iterator<Pair<Integer,Long>> iter = new ZipShortestIterator(ints.iterator(), longs.iterator());
        Assert.assertFalse(iter.hasNext());
    }
View Full Code Here

Examples of net.emaze.dysfunctional.convolutions.ZipShortestIterator

   
    @Test
    public void consumedIteratorsHasNoNextElement() {
        List<Integer> ints = Arrays.asList(1);
        List<Long> longs = Arrays.asList(2l);
        Iterator<Pair<Integer,Long>> iter = new ZipShortestIterator(ints.iterator(), longs.iterator());
        iter.next();
        Assert.assertFalse(iter.hasNext());
    }
View Full Code Here

Examples of net.emaze.dysfunctional.convolutions.ZipShortestIterator


    public void iteratorsAreConsumedInOrder() {
        List<Integer> ints = Arrays.asList(1,2);
        List<Long> longs = Arrays.asList(11l,12l);
        Iterator<Pair<Integer,Long>> iter = new ZipShortestIterator(ints.iterator(), longs.iterator());
        Assert.assertEquals(Pair.of(1,11l), iter.next());
        Assert.assertEquals(Pair.of(2,12l), iter.next());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.