use of it.unimi.dsi.fastutil.longs.Long2FloatMap in project snow-owl by b2ihealthcare.
the class LongKeyFloatMapWrapper method create.
public static LongKeyFloatMap create(LongKeyFloatMap map) {
if (map instanceof LongKeyFloatMapWrapper) {
final Long2FloatMap sourceDelegate = ((LongKeyFloatMapWrapper) map).delegate;
return new LongKeyFloatMapWrapper(clone(sourceDelegate));
} else {
final LongKeyFloatMap result = createWithExpectedSize(map.size());
final LongIterator keys = map.keySet().iterator();
while (keys.hasNext()) {
final long key = keys.next();
result.put(key, map.get(key));
}
return result;
}
}
Aggregations