/** Puts all elements in a list and returns them. This is an O(n) operation. */ @Override public ReifiedList<T> toList() { return store.getKeys().toList(); }
/** * Returns an ascending key order iterator over the set. This is an O(nlog2(n)) operation, taking * element traversal into account. */ @Override public Iterator<T> iterator() { return store.getKeys().iterator(); }
/** Puts all elements in an array and returns them. This is an O(n) operation. */ @Override public T[] toArray() { return store.getKeys().toArray(); }
/** * Returns true if an item is contained in the collection. This is an O(log2(n)) operation. * * @throws NullPointerException When the item is null. */ @Override public boolean contains(T item) { if (item == null) throw new NullPointerException("item"); return store.getKeys().contains(item); }