use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class ClassificationTracker method indexEquivalentConcepts.
private void indexEquivalentConcepts(final Writer writer, final String classificationId, final IInternalSctIdMultimap equivalentConcepts) throws IOException {
for (final LongIterator itr = equivalentConcepts.keySet().iterator(); itr.hasNext(); ) /*empty*/
{
final long representativeConcept = itr.next();
final LongSet equivalents = equivalentConcepts.get(representativeConcept);
final LongList orderedConcepts = PrimitiveLists.newLongArrayListWithExpectedSize(equivalents.size() + 1);
orderedConcepts.add(representativeConcept);
orderedConcepts.addAll(equivalents);
final EquivalentConceptSetDocument equivalentDoc = EquivalentConceptSetDocument.builder().classificationId(classificationId).conceptIds(orderedConcepts).unsatisfiable(false).build();
writer.put(equivalentDoc);
}
}
Aggregations