154 |
|
} |
155 |
|
|
156 |
|
/** |
157 |
< |
* Returns an iterator over the elements in this set. The elements |
158 |
< |
* are returned in ascending order. |
157 |
> |
* Returns an iterator over the elements in this set in ascending order. |
158 |
|
* |
159 |
< |
* @return an iterator over the elements in this set |
159 |
> |
* @return an iterator over the elements in this set in ascending order |
160 |
|
*/ |
161 |
|
public Iterator<E> iterator() { |
162 |
|
return m.keySet().iterator(); |
163 |
|
} |
164 |
|
|
165 |
|
/** |
166 |
< |
* Returns an iterator over the elements in this set. The elements |
168 |
< |
* are returned in descending order. |
166 |
> |
* Returns an iterator over the elements in this set in descending order. |
167 |
|
* |
168 |
< |
* @return an iterator over the elements in this set |
168 |
> |
* @return an iterator over the elements in this set in descending order |
169 |
|
*/ |
170 |
|
public Iterator<E> descendingIterator() { |
171 |
|
return m.descendingKeySet().iterator(); |
246 |
|
/** |
247 |
|
* Adds all of the elements in the specified collection to this set. |
248 |
|
* |
249 |
< |
* @param c elements to be added |
249 |
> |
* @param c collection containing elements to be added to this set |
250 |
|
* @return <tt>true</tt> if this set changed as a result of the call |
251 |
|
* @throws ClassCastException if the elements provided cannot be compared |
252 |
|
* with the elements currently in the set |