Search in sources :

Example 1 with LongList

use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.

the class EmptyLongListTest method removeAll.

@Test
public void removeAll() {
    LongList emptyList = LongCollections.emptyList();
    LongList otherList = PrimitiveLists.newLongArrayList(0L, 5L, 10L);
    emptyList.removeAll(otherList);
    assertEquals("Empty list should remain empty.", 0, emptyList.size());
    assertTrue("Non-empty list should not change.", otherList.get(0) == 0L && otherList.get(1) == 5L && otherList.get(2) == 10L && otherList.size() == 3);
}
Also used : LongList(com.b2international.collections.longs.LongList) Test(org.junit.Test)

Example 2 with LongList

use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.

the class EmptyLongListTest method equals_true.

@Test
public void equals_true() {
    LongList emptyList = LongCollections.emptyList();
    LongList otherList = LongCollections.emptyList();
    assertTrue("First list should be equal to second list.", emptyList.equals(otherList));
    assertTrue("Second list should be equal to first list.", otherList.equals(emptyList));
}
Also used : LongList(com.b2international.collections.longs.LongList) Test(org.junit.Test)

Example 3 with LongList

use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.

the class EmptyLongListTest method iterator_overrun.

@Test(expected = NoSuchElementException.class)
public void iterator_overrun() {
    LongList emptyList = LongCollections.emptyList();
    LongIterator itr = emptyList.iterator();
    itr.next();
}
Also used : LongList(com.b2international.collections.longs.LongList) LongIterator(com.b2international.collections.longs.LongIterator) Test(org.junit.Test)

Example 4 with LongList

use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.

the class EmptyLongListTest method equals_true_different_types.

@Test
public void equals_true_different_types() {
    LongList emptyList = LongCollections.emptyList();
    LongList otherList = PrimitiveLists.newLongArrayList();
    assertTrue("First list should be equal to second list.", emptyList.equals(otherList));
    assertTrue("Second list should be equal to first list.", otherList.equals(emptyList));
}
Also used : LongList(com.b2international.collections.longs.LongList) Test(org.junit.Test)

Example 5 with LongList

use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.

the class EmptyLongListTest method addAll.

@Test(expected = UnsupportedOperationException.class)
public void addAll() {
    LongList emptyList = LongCollections.emptyList();
    LongList otherList = PrimitiveLists.newLongArrayList(1L, 2L, 3L);
    emptyList.addAll(otherList);
}
Also used : LongList(com.b2international.collections.longs.LongList) Test(org.junit.Test)

Aggregations

LongList (com.b2international.collections.longs.LongList)26 Test (org.junit.Test)22 LongIterator (com.b2international.collections.longs.LongIterator)4 LongSet (com.b2international.collections.longs.LongSet)2 PrimitiveMaps (com.b2international.collections.PrimitiveMaps)1 PrimitiveSets (com.b2international.collections.PrimitiveSets)1 LongKeyMap (com.b2international.collections.longs.LongKeyMap)1 LongSets (com.b2international.commons.collect.LongSets)1 ExpressionBuilder (com.b2international.index.query.Expressions.ExpressionBuilder)1 Concepts (com.b2international.snowowl.snomed.common.SnomedConstants.Concepts)1 RelationshipValue (com.b2international.snowowl.snomed.core.domain.RelationshipValue)1 ConcreteDomainFragment (com.b2international.snowowl.snomed.datastore.ConcreteDomainFragment)1 StatementFragment (com.b2international.snowowl.snomed.datastore.StatementFragment)1 StatementFragmentWithDestination (com.b2international.snowowl.snomed.datastore.StatementFragmentWithDestination)1 StatementFragmentWithValue (com.b2international.snowowl.snomed.datastore.StatementFragmentWithValue)1 PropertyChain (com.b2international.snowowl.snomed.datastore.index.taxonomy.PropertyChain)1 ReasonerTaxonomy (com.b2international.snowowl.snomed.datastore.index.taxonomy.ReasonerTaxonomy)1 INormalFormGenerator (com.b2international.snowowl.snomed.reasoner.classification.INormalFormGenerator)1 ReasonerTaxonomyInferrer (com.b2international.snowowl.snomed.reasoner.classification.ReasonerTaxonomyInferrer)1 OntologyChangeProcessor (com.b2international.snowowl.snomed.reasoner.diff.OntologyChangeProcessor)1