106 |
|
} |
107 |
|
|
108 |
|
/** |
109 |
< |
* Constructs a new, empty tree set, sorted according to the |
110 |
< |
* specified comparator. All elements inserted into the set must |
111 |
< |
* be <i>mutually comparable</i> by the specified comparator: |
112 |
< |
* <tt>comparator.compare(e1, e2)</tt> must not throw a |
113 |
< |
* <tt>ClassCastException</tt> for any elements <tt>e1</tt> and |
114 |
< |
* <tt>e2</tt> in the set. If the user attempts to add an element |
115 |
< |
* to the set that violates this constraint, the |
116 |
< |
* <tt>add(Object)</tt> call will throw a |
117 |
< |
* <tt>ClassCastException</tt>. |
109 |
> |
* Constructs a new, empty tree set, sorted according to the specified |
110 |
> |
* comparator. All elements inserted into the set must be <i>mutually |
111 |
> |
* comparable</i> by the specified comparator: <tt>comparator.compare(e1, |
112 |
> |
* e2)</tt> must not throw a <tt>ClassCastException</tt> for any elements |
113 |
> |
* <tt>e1</tt> and <tt>e2</tt> in the set. If the user attempts to add |
114 |
> |
* an element to the set that violates this constraint, the |
115 |
> |
* <tt>add(Object)</tt> call will throw a <tt>ClassCastException</tt>. |
116 |
|
* |
117 |
|
* @param comparator the comparator that will be used to order this set. |
118 |
|
* If <tt>null</tt>, the {@linkplain Comparable natural |
123 |
|
} |
124 |
|
|
125 |
|
/** |
126 |
< |
* Constructs a new tree set containing the elements in the |
127 |
< |
* specified collection, sorted according to the <i>natural |
128 |
< |
* ordering</i> of its elements. All elements inserted into the |
129 |
< |
* set must implement the {@link Comparable} interface. |
130 |
< |
* Furthermore, all such elements must be <i>mutually |
133 |
< |
* comparable</i>: <tt>e1.compareTo(e2)</tt> must not throw a |
126 |
> |
* Constructs a new tree set containing the elements in the specified |
127 |
> |
* collection, sorted according to the <i>natural ordering</i> of its |
128 |
> |
* elements. All elements inserted into the set must implement the |
129 |
> |
* {@link Comparable} interface. Furthermore, all such elements must be |
130 |
> |
* <i>mutually comparable</i>: <tt>e1.compareTo(e2)</tt> must not throw a |
131 |
|
* <tt>ClassCastException</tt> for any elements <tt>e1</tt> and |
132 |
|
* <tt>e2</tt> in the set. |
133 |
|
* |