예제 #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);
  }