Package it.unimi.dsi.fastutil.longs

Examples of it.unimi.dsi.fastutil.longs.LongSortedSet.last()


        LongKeyDomain keys = LongKeyDomain.create(2, 7, 8, 42, 639);
        keys.setActive(0, false);
        LongSortedSet set = new LongSortedArraySet(keys);
        assertThat(set, hasSize(4));
        assertThat(set.first(), equalTo(7l));
        assertThat(set.last(), equalTo(639l));
        assertTrue(set.contains(7));
        assertTrue(set.contains(42));
        assertFalse(set.contains(2));
        assertThat(LongIterators.unwrap(set.iterator()),
                   equalTo(new long[]{7, 8, 42, 639}));
View Full Code Here


        LongKeyDomain keys = LongKeyDomain.create(2, 7, 8, 42, 639);
        keys.setActive(2, false);
        LongSortedSet set = new LongSortedArraySet(keys);
        assertThat(set, hasSize(4));
        assertThat(set.first(), equalTo(2l));
        assertThat(set.last(), equalTo(639l));
        assertTrue(set.contains(7));
        assertTrue(set.contains(42));
        assertFalse(set.contains(8));
        assertThat(LongIterators.unwrap(set.iterator()),
                   equalTo(new long[]{2, 7, 42, 639}));
View Full Code Here

        LongKeyDomain keys = LongKeyDomain.create(2, 7, 8, 42, 639);
        keys.setActive(4, false);
        LongSortedSet set = new LongSortedArraySet(keys);
        assertThat(set, hasSize(4));
        assertThat(set.first(), equalTo(2l));
        assertThat(set.last(), equalTo(42l));
        assertTrue(set.contains(8));
        assertFalse(set.contains(639));
        assertThat(LongIterators.unwrap(set.iterator()),
                   equalTo(new long[]{2, 7, 8, 42}));
        assertThat(LongIterators.unwrap(set.iterator(2)),
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.