Пример #1
0
 /** Puts all elements in a list and returns them. This is an O(n) operation. */
 @Override
 public ReifiedList<T> toList() {
   return store.getKeys().toList();
 }
Пример #2
0
 /**
  * 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();
 }
Пример #3
0
 /** Puts all elements in an array and returns them. This is an O(n) operation. */
 @Override
 public T[] toArray() {
   return store.getKeys().toArray();
 }
Пример #4
0
  /**
   * 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);
  }