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

Class UnmodifiableSortedSet

lib/java/util/Collections.java:1423–1457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1421 }
1422
1423 private static class UnmodifiableSortedSet<E> extends UnmodifiableSet<E>
1424 implements SortedSet<E> {
1425 private static final long serialVersionUID = -4929149591599911165L;
1426
1427 private final SortedSet<E> ss;
1428
1429 UnmodifiableSortedSet(SortedSet<E> set) {
1430 super(set);
1431 ss = set;
1432 }
1433
1434 public Comparator<? super E> comparator() {
1435 return ss.comparator();
1436 }
1437
1438 public E first() {
1439 return ss.first();
1440 }
1441
1442 public SortedSet<E> headSet(E before) {
1443 return new UnmodifiableSortedSet<E>(ss.headSet(before));
1444 }
1445
1446 public E last() {
1447 return ss.last();
1448 }
1449
1450 public SortedSet<E> subSet(E start, E end) {
1451 return new UnmodifiableSortedSet<E>(ss.subSet(start, end));
1452 }
1453
1454 public SortedSet<E> tailSet(E after) {
1455 return new UnmodifiableSortedSet<E>(ss.tailSet(after));
1456 }
1457 }
1458
1459 private Collections() {
1460 /* empty */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected