/** * Create a key set from a collection of keys. * * @param keys The key collection. * @return The key set. */ public static SortedKeyIndex fromCollection(Collection<Long> keys) { if (keys instanceof LongSortedArraySet) { return ((LongSortedArraySet) keys).getIndex(); } else { return fromIterator(keys.size(), keys.iterator()); } }
/** * Create a key set from a collection of keys. * * @param keys The key collection. * @return The key set. */ public static SortedKeyIndex fromCollection(Collection<Long> keys) { if (keys instanceof LongSortedArraySet) { return ((LongSortedArraySet) keys).getIndex(); } else { return fromIterator(keys.size(), keys.iterator()); } }