MCPcopy Create free account
hub / github.com/davidgiven/luje / CheckedSortedSet

Class CheckedSortedSet

lib/java/util/Collections.java:3509–3570  ·  view source on GitHub ↗

Class represents a dynamically typesafe view of the specified sortedSet.

Source from the content-addressed store, hash-verified

3507 * Class represents a dynamically typesafe view of the specified sortedSet.
3508 */
3509 private static class CheckedSortedSet<E> extends CheckedSet<E> implements
3510 SortedSet<E> {
3511
3512 private static final long serialVersionUID = 1599911165492914959L;
3513
3514 private SortedSet<E> ss;
3515
3516 /**
3517 * Constructs a dynamically typesafe view of the specified sortedSet.
3518 *
3519 * @param s -
3520 * the sortedSet for which a dynamically typesafe view is to
3521 * be constructed.
3522 */
3523 public CheckedSortedSet(SortedSet<E> s, Class<E> type) {
3524 super(s, type);
3525 this.ss = s;
3526 }
3527
3528 /**
3529 * @see java.util.SortedSet#comparator()
3530 */
3531 public Comparator<? super E> comparator() {
3532 return ss.comparator();
3533 }
3534
3535 /**
3536 * @see java.util.SortedSet#subSet(Object, Object)
3537 */
3538 public SortedSet<E> subSet(E fromElement, E toElement) {
3539 return new CheckedSortedSet<E>(ss.subSet(fromElement, toElement),
3540 type);
3541 }
3542
3543 /**
3544 * @see java.util.SortedSet#headSet(Object)
3545 */
3546 public SortedSet<E> headSet(E toElement) {
3547 return new CheckedSortedSet<E>(ss.headSet(toElement), type);
3548 }
3549
3550 /**
3551 * @see java.util.SortedSet#tailSet(Object)
3552 */
3553 public SortedSet<E> tailSet(E fromElement) {
3554 return new CheckedSortedSet<E>(ss.tailSet(fromElement), type);
3555 }
3556
3557 /**
3558 * @see java.util.SortedSet#first()
3559 */
3560 public E first() {
3561 return ss.first();
3562 }
3563
3564 /**
3565 * @see java.util.SortedSet#last()
3566 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected