Search in sources :

Example 21 with LongList

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

the class EmptyLongListTest method add.

@Test(expected = UnsupportedOperationException.class)
public void add() {
    LongList emptyList = LongCollections.emptyList();
    emptyList.add(0L);
}
Also used : LongList(com.b2international.collections.longs.LongList) Test(org.junit.Test)

Example 22 with LongList

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

the class EmptyLongListTest method retainAll_null.

@Test(expected = NullPointerException.class)
public void retainAll_null() {
    LongList emptyList = LongCollections.emptyList();
    emptyList.retainAll(null);
}
Also used : LongList(com.b2international.collections.longs.LongList) Test(org.junit.Test)

Example 23 with LongList

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

the class EmptyLongListTest method toArray_empty.

@Test
public void toArray_empty() {
    LongList emptyList = LongCollections.emptyList();
    long[] array = emptyList.toArray();
    assertEquals("Array should be empty for empty lists.", 0, array.length);
}
Also used : LongList(com.b2international.collections.longs.LongList) Test(org.junit.Test)

Example 24 with LongList

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

the class EmptyLongListTest method iterator_empty.

@Test
public void iterator_empty() {
    LongList emptyList = LongCollections.emptyList();
    LongIterator itr = emptyList.iterator();
    assertFalse("Iterator should indicate that there are no elements.", itr.hasNext());
}
Also used : LongList(com.b2international.collections.longs.LongList) LongIterator(com.b2international.collections.longs.LongIterator) Test(org.junit.Test)

Example 25 with LongList

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

the class EmptyLongListTest method containsAll_same.

@Test
public void containsAll_same() {
    LongList emptyList = LongCollections.emptyList();
    LongList otherList = LongCollections.emptyList();
    assertTrue("First list should contain all elements from second list.", emptyList.containsAll(otherList));
    assertTrue("Second list should contain all elements from first list.", otherList.containsAll(emptyList));
}
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