use of com.b2international.collections.longs.LongSet in project snow-owl by b2ihealthcare.
the class NormalFormRelationship method hasCommonExhaustiveSuperType.
private boolean hasCommonExhaustiveSuperType(final NormalFormRelationship other) {
final InternalIdEdges inferredAncestors = reasonerTaxonomy.getInferredAncestors();
final LongSet valueAncestors = inferredAncestors.getDestinations(getDestinationId(), false);
final LongSet otherValueAncestors = inferredAncestors.getDestinations(other.getDestinationId(), false);
final LongSet commonAncestors = LongSets.intersection(valueAncestors, otherValueAncestors);
for (final LongIterator itr = commonAncestors.iterator(); itr.hasNext(); ) /* empty */
{
final long commonAncestor = itr.next();
if (isExhaustive(commonAncestor)) {
return true;
}
}
return false;
}
use of com.b2international.collections.longs.LongSet in project snow-owl by b2ihealthcare.
the class LongOpenHashSetTest method create_null_array.
@Test
public void create_null_array() {
LongSet longSet = PrimitiveSets.newLongOpenHashSet((long[]) null);
assertTrue("Long set should be empty.", longSet.isEmpty());
}
use of com.b2international.collections.longs.LongSet in project snow-owl by b2ihealthcare.
the class LongOpenHashSetTest method retainAll_null.
@Test(expected = NullPointerException.class)
public void retainAll_null() {
LongSet longSet = PrimitiveSets.newLongOpenHashSet();
longSet.add(0L);
longSet.add(5L);
longSet.add(10L);
longSet.retainAll(null);
}
use of com.b2international.collections.longs.LongSet in project snow-owl by b2ihealthcare.
the class LongOpenHashSetTest method create_fill_factor.
@Test
public void create_fill_factor() {
LongSet longSet = PrimitiveSets.newLongOpenHashSetWithExpectedSize(10, 0.5d);
assertTrue("Long set should be empty.", longSet.isEmpty());
}
use of com.b2international.collections.longs.LongSet in project snow-owl by b2ihealthcare.
the class LongOpenHashSetTest method create_null_collection.
@Test
public void create_null_collection() {
LongSet longSet = PrimitiveSets.newLongOpenHashSet((LongCollection) null);
assertTrue("Long set should be empty.", longSet.isEmpty());
}
Aggregations