210 |
|
/** |
211 |
|
* Adds the specified element to this set if it is not already present. |
212 |
|
* |
213 |
< |
* @param o element to be added to this set. |
213 |
> |
* @param e element to be added to this set. |
214 |
|
* @return <tt>true</tt> if the set did not already contain the specified |
215 |
|
* element. |
216 |
|
* |
217 |
|
* @throws ClassCastException if the specified object cannot be compared |
218 |
|
* with the elements currently in the set. |
219 |
< |
* @throws NullPointerException if o is <tt>null</tt> and this map |
219 |
> |
* @throws NullPointerException if e is <tt>null</tt> and this map |
220 |
|
* uses natural ordering and is non-empty, or its comparator does |
221 |
|
* not tolerate <tt>null</tt> keys. |
222 |
|
*/ |
223 |
< |
public boolean add(E o) { |
224 |
< |
return m.put(o, PRESENT)==null; |
223 |
> |
public boolean add(E e) { |
224 |
> |
return m.put(e, PRESENT)==null; |
225 |
|
} |
226 |
|
|
227 |
|
/** |
511 |
|
* Returns an element greater than or equal to the given element, or |
512 |
|
* <tt>null</tt> if there is no such element. |
513 |
|
* |
514 |
< |
* @param o the value to match |
514 |
> |
* @param e the value to match |
515 |
|
* @return an element greater than or equal to given element, or |
516 |
|
* <tt>null</tt> if there is no such element. |
517 |
< |
* @throws ClassCastException if o cannot be compared with the elements |
517 |
> |
* @throws ClassCastException if e cannot be compared with the elements |
518 |
|
* currently in the set. |
519 |
< |
* @throws NullPointerException if o is <tt>null</tt> and this map |
519 |
> |
* @throws NullPointerException if e is <tt>null</tt> and this map |
520 |
|
* uses natural ordering and is non-empty, or its comparator does |
521 |
|
* not tolerate <tt>null</tt> keys. |
522 |
|
*/ |
523 |
< |
public E ceiling(E o) { |
524 |
< |
return m.ceilingKey(o); |
523 |
> |
public E ceiling(E e) { |
524 |
> |
return m.ceilingKey(e); |
525 |
|
} |
526 |
|
|
527 |
|
/** |
528 |
|
* Returns an element strictly less than the given element, or |
529 |
|
* <tt>null</tt> if there is no such element. |
530 |
|
* |
531 |
< |
* @param o the value to match |
531 |
> |
* @param e the value to match |
532 |
|
* @return the greatest element less than the given element, or |
533 |
|
* <tt>null</tt> if there is no such element. |
534 |
< |
* @throws ClassCastException if o cannot be compared with the elements |
534 |
> |
* @throws ClassCastException if e cannot be compared with the elements |
535 |
|
* currently in the set. |
536 |
< |
* @throws NullPointerException if o is <tt>null</tt> and this map |
536 |
> |
* @throws NullPointerException if e is <tt>null</tt> and this map |
537 |
|
* uses natural ordering and is non-empty, or its comparator does |
538 |
|
* not tolerate <tt>null</tt> keys. |
539 |
|
*/ |
540 |
< |
public E lower(E o) { |
541 |
< |
return m.lowerKey(o); |
540 |
> |
public E lower(E e) { |
541 |
> |
return m.lowerKey(e); |
542 |
|
} |
543 |
|
|
544 |
|
/** |
545 |
|
* Returns an element less than or equal to the given element, or |
546 |
|
* <tt>null</tt> if there is no such element. |
547 |
|
* |
548 |
< |
* @param o the value to match |
548 |
> |
* @param e the value to match |
549 |
|
* @return the greatest element less than or equal to given |
550 |
|
* element, or <tt>null</tt> if there is no such element. |
551 |
< |
* @throws ClassCastException if o cannot be compared with the elements |
551 |
> |
* @throws ClassCastException if e cannot be compared with the elements |
552 |
|
* currently in the set. |
553 |
< |
* @throws NullPointerException if o is <tt>null</tt> and this map |
553 |
> |
* @throws NullPointerException if e is <tt>null</tt> and this map |
554 |
|
* uses natural ordering and is non-empty, or its comparator does |
555 |
|
* not tolerate <tt>null</tt> keys. |
556 |
|
*/ |
557 |
< |
public E floor(E o) { |
558 |
< |
return m.floorKey(o); |
557 |
> |
public E floor(E e) { |
558 |
> |
return m.floorKey(e); |
559 |
|
} |
560 |
|
|
561 |
|
/** |
562 |
|
* Returns an element strictly greater than the given element, or |
563 |
|
* <tt>null</tt> if there is no such element. |
564 |
|
* |
565 |
< |
* @param o the value to match |
565 |
> |
* @param e the value to match |
566 |
|
* @return the least element greater than the given element, or |
567 |
|
* <tt>null</tt> if there is no such element. |
568 |
< |
* @throws ClassCastException if o cannot be compared with the elements |
568 |
> |
* @throws ClassCastException if e cannot be compared with the elements |
569 |
|
* currently in the set. |
570 |
< |
* @throws NullPointerException if o is <tt>null</tt> and this map |
570 |
> |
* @throws NullPointerException if e is <tt>null</tt> and this map |
571 |
|
* uses natural ordering and is non-empty, or its comparator does |
572 |
|
* not tolerate <tt>null</tt> keys. |
573 |
|
*/ |
574 |
< |
public E higher(E o) { |
575 |
< |
return m.higherKey(o); |
574 |
> |
public E higher(E e) { |
575 |
> |
return m.higherKey(e); |
576 |
|
} |
577 |
|
|
578 |
|
/** |