Search in sources :

Example 26 with MutableLongSet

use of org.eclipse.collections.api.set.primitive.MutableLongSet in project mapdb by jankotek.

the class AbstractLongSetTestCase method detectIfNone.

@Override
@Test
public void detectIfNone() {
    super.detectIfNone();
    MutableLongSet set = this.newWith(0L, 1L, 31L, AbstractLongSetTestCase.generateCollisions1().getFirst(), AbstractLongSetTestCase.generateCollisions1().get(1));
    Assert.assertEquals(0L, set.detectIfNone(LongPredicates.lessThan(1L), 9L));
    Assert.assertEquals(AbstractLongSetTestCase.generateCollisions1().get(1), set.detectIfNone(LongPredicates.greaterThan(AbstractLongSetTestCase.generateCollisions1().getFirst()), 9L));
    Assert.assertEquals(9L, set.detectIfNone(LongPredicates.greaterThan(AbstractLongSetTestCase.generateCollisions1().get(1)), 9L));
}
Also used : MutableLongSet(org.eclipse.collections.api.set.primitive.MutableLongSet) Test(org.junit.Test)

Aggregations

MutableLongSet (org.eclipse.collections.api.set.primitive.MutableLongSet)26 Test (org.junit.Test)24 LongHashSet (org.eclipse.collections.impl.set.mutable.primitive.LongHashSet)5 LongIterator (org.eclipse.collections.api.iterator.LongIterator)3 LongArrayList (org.eclipse.collections.impl.list.mutable.primitive.LongArrayList)2